-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
31,474 additions
and
189 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
QMAKE_CXX.QT_COMPILER_STDCXX = 201703L | ||
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 11 | ||
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 | ||
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 | ||
QMAKE_CXX.COMPILER_MACROS = \ | ||
QT_COMPILER_STDCXX \ | ||
QMAKE_GCC_MAJOR_VERSION \ | ||
QMAKE_GCC_MINOR_VERSION \ | ||
QMAKE_GCC_PATCH_VERSION | ||
QMAKE_CXX.INCDIRS = \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++ \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/x86_64-w64-mingw32 \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/backward \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed \ | ||
D:/Qt/Tools/mingw1120_64/x86_64-w64-mingw32/include | ||
QMAKE_CXX.LIBDIRS = \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0 \ | ||
D:/Qt/Tools/mingw1120_64/lib/gcc \ | ||
D:/Qt/Tools/mingw1120_64/x86_64-w64-mingw32/lib \ | ||
D:/Qt/Tools/mingw1120_64/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Documentation: http://qtgifimage.debao.me ( invalided at 5th, Dec. 2017 ) | ||
|
||
New Documentation: http://doc.qtdream.com/qtgifimage | ||
|
||
Website: http://qtdream.com | ||
|
||
Modified by: jiangcaiyang | ||
|
||
Get compiled for Qt 5.9.2 Mac OSX and Windows 10 | ||
|
||
Qt Gif Image is a Qt library that can read and write Gif files. | ||
|
||
## Getting Started | ||
|
||
### Usage(1): Use Qt Gif Image as Qt5's addon module | ||
|
||
* Download the source code. | ||
|
||
* Put the source code in any directory you like. At the toplevel directory run | ||
|
||
**Note**: Perl is needed. | ||
|
||
``` | ||
qmake | ||
make | ||
make install | ||
``` | ||
|
||
The library, the header files, and others will be installed to your system. | ||
|
||
* Add following line to your qmake's project file: | ||
|
||
``` | ||
QT += gifimage | ||
``` | ||
|
||
* Then, using Qt Gif Image in your code | ||
|
||
### Usage(2): Use source code directly | ||
|
||
The package contains a **qtgifimage.pri** file that allows you to integrate the component into applications that use qmake for the build step. | ||
|
||
* Download the source code. | ||
|
||
* Put the source code in any directory you like. For example, 3rdparty: | ||
|
||
``` | ||
|-- project.pro | ||
|-- .... | ||
|-- 3rdparty\ | ||
| |-- qtgifimage\ | ||
| | | ||
``` | ||
|
||
* Add following line to your qmake project file: | ||
|
||
``` | ||
include(3rdparty/qtgifimage/src/gifimage/qtgifimage.pri) | ||
``` | ||
|
||
* Then, using Qt Gif Image in your code | ||
|
||
## References | ||
|
||
* http://giflib.sourceforge.net/intro.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TEMPLATE = subdirs | ||
SUBDIRS = gifimage | ||
|
22 changes: 22 additions & 0 deletions
22
3rdparty/qtgifimage/examples/gifimage/creategif/creategif.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#------------------------------------------------- | ||
# | ||
# Project created by QtCreator 2013-11-07T16:42:27 | ||
# | ||
#------------------------------------------------- | ||
|
||
QT += gifimage | ||
|
||
TARGET = creategif | ||
CONFIG += console | ||
CONFIG -= app_bundle | ||
|
||
TEMPLATE = app | ||
|
||
|
||
SOURCES += main.cpp | ||
DEFINES += SRCDIR=\\\"$$PWD/\\\" | ||
# 安装到例子里面 | ||
target.path = $$[QT_INSTALL_EXAMPLES]/qtgifimage | ||
INSTALLS += target | ||
CONFIG += install_ok |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
3rdparty/qtgifimage/examples/gifimage/creategif/doc/src/creategif.qdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*! | ||
\example creategif | ||
\title Create .gif Example | ||
\brief This is a simplest example. | ||
\ingroup qtgifimage-examples | ||
|
||
This example demonstrates how to create a new | ||
.gif file from a list of QImage. | ||
So lets see how this is achieved. | ||
\image demo1.gif | ||
|
||
This creates a new instance of the all important QGifImage class. | ||
\snippet creategif/main.cpp 0 | ||
|
||
Let's start by setting the global color table, background color and | ||
the default transparent color. | ||
\snippet creategif/main.cpp 1 | ||
|
||
Now we create a QImage object, draw something on it. Then add it to | ||
the gif canvas ten times with defferent offset. | ||
\snippet creategif/main.cpp 2 | ||
|
||
Now save the file and all its components. | ||
\snippet creategif/main.cpp 3 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "qgifimage.h" | ||
#include <QPainter> | ||
#include <QImage> | ||
#include <QGuiApplication> | ||
#include <QDebug> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
QGuiApplication app(argc, argv); | ||
|
||
//![0] | ||
QGifImage gif(QSize(300, 300)); | ||
//![0] | ||
//![1] | ||
QVector<QRgb> ctable; | ||
ctable << qRgb(255, 255, 255) | ||
<< qRgb(0, 0, 0) | ||
<< qRgb(255, 0, 0) | ||
<< qRgb(0, 255, 0) | ||
<< qRgb(0, 0, 255) | ||
<< qRgb(255, 255, 0) | ||
<< qRgb(0, 255, 255) | ||
<< qRgb(255, 0, 255); | ||
|
||
gif.setGlobalColorTable(ctable, Qt::black); | ||
gif.setDefaultTransparentColor(Qt::black); | ||
gif.setDefaultDelay(100); | ||
//![1] | ||
//![2] | ||
QImage image(100, 100, QImage::Format_RGB32); | ||
image.fill(QColor(Qt::black)); | ||
QPainter p(&image); | ||
p.setPen(Qt::red); | ||
p.drawText(15, 15, "Qt"); | ||
p.drawRect(20, 20, 60, 60); | ||
|
||
for (int i=0; i<10; ++i) { | ||
gif.addFrame(image, QPoint(i*20, i*20)); | ||
} | ||
//![2] | ||
//![3] | ||
gif.save(SRCDIR"demo1.gif"); | ||
//![3] | ||
|
||
return 0; | ||
} |
9 changes: 9 additions & 0 deletions
9
3rdparty/qtgifimage/examples/gifimage/extractFrames/doc/src/extractframes.qdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! | ||
\example extractframes | ||
\title Extract Frames Example | ||
\brief This is a simplest example. | ||
\ingroup qtgifimage-examples | ||
|
||
This example demonstrates how to extract QImage from .gif file. | ||
So lets see how this is achieved. | ||
*/ |
16 changes: 16 additions & 0 deletions
16
3rdparty/qtgifimage/examples/gifimage/extractFrames/extractFrames.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
QT += gifimage | ||
|
||
TARGET = extractFrames | ||
CONFIG += console | ||
CONFIG -= app_bundle | ||
|
||
TEMPLATE = app | ||
|
||
SOURCES += main.cpp | ||
|
||
DEFINES += SRCDIR=\\\"$$PWD/\\\" | ||
# 安装到例子里面 | ||
target.path = $$[QT_INSTALL_EXAMPLES]/qtgifimage | ||
INSTALLS += target | ||
CONFIG += install_ok |
19 changes: 19 additions & 0 deletions
19
3rdparty/qtgifimage/examples/gifimage/extractFrames/main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "qgifimage.h" | ||
#include <QDebug> | ||
|
||
int main() | ||
{ | ||
QGifImage gif(SRCDIR"test.gif"); | ||
|
||
for (int i=0; i<gif.frameCount(); ++i) { | ||
QImage image = gif.frame(i); | ||
|
||
qDebug()<<QString("Frame %1: size %2X%3 at (%4, %5)").arg(i) | ||
.arg(image.width()).arg(image.height()) | ||
.arg(image.offset().x()).arg(image.offset().y()); | ||
|
||
image.save(QString(SRCDIR"test_%1.png").arg(i)); | ||
} | ||
|
||
return 0; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
TEMPLATE = subdirs | ||
SUBDIRS = \ | ||
extractFrames \ | ||
creategif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/**************************************************************************** | ||
** Copyright (c) 2013 Debao Zhang <[email protected]> | ||
** All right reserved. | ||
** | ||
** Permission is hereby granted, free of charge, to any person obtaining | ||
** a copy of this software and associated documentation files (the | ||
** "Software"), to deal in the Software without restriction, including | ||
** without limitation the rights to use, copy, modify, merge, publish, | ||
** distribute, sublicense, and/or sell copies of the Software, and to | ||
** permit persons to whom the Software is furnished to do so, subject to | ||
** the following conditions: | ||
** | ||
** The above copyright notice and this permission notice shall be | ||
** included in all copies or substantial portions of the Software. | ||
** | ||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
** | ||
****************************************************************************/ | ||
|
||
/*! | ||
\title Qt GifImage | ||
\page index.html | ||
\brief Qt GifImage provides functionality for handling .gif files. | ||
|
||
The \l{Qt GifImage C++ Classes}{Qt GifImage Module} provides a set of classes to read and write .gif files. | ||
The library can be used to | ||
|
||
\list | ||
\li Generate a new .gif file from a list of QImage. | ||
\li Extract all frames of an animated Gif into a QImage list. | ||
\endlist | ||
|
||
\table | ||
\row | ||
\li Source code: \li \l{https://github.com/dbzhang800/QtGifImage} | ||
\row | ||
\li Issures: \li \l{https://github.com/dbzhang800/QtGifImage/issues} | ||
\row | ||
\li License: \li MIT | ||
\endtable | ||
|
||
\section1 Getting Started | ||
|
||
To include the definitions of the module's classes, using the following directive: | ||
|
||
\code | ||
#include <QtGifImage> | ||
\endcode | ||
|
||
To link against the module, add this line to your qmake .pro file: | ||
|
||
\code | ||
QT += gifimage | ||
\endcode | ||
|
||
More information can be found in \l{Qt GifImage Build} page. | ||
|
||
\section1 Related information | ||
\list | ||
\li \l{Qt GifImage C++ Classes} | ||
\li \l{Qt GifImage Examples} | ||
\endlist | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
load(qt_parts) | ||
|
||
OTHER_FILES += README.md |
Oops, something went wrong.