BSD 3-Clause "New" or "Revised" License

项目介绍

Skycoder42/QtApng 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前获得 106 个 Star、40 次 Fork。

仓库全名
Skycoder42/QtApng
开源许可证
BSD 3-Clause "New" or "Revised" License
Star 数
106
Fork 数
40
未关闭 Issue
2

README 摘要

QtApng apng image plugin for Qt to support animated PNGs Features Enable the usage of apng images with Qt. The plugin adds the apng format as a new format for any Qt application, and thus supports loading of apng images via QMovie, AnimatedImage and other types. Requirements To build the plugin, libpng with the apng patch applied is required. By default the libpng provided by pkg-config is used for unix-like…

完整内容见 GitHub 原始 README 或本页 。

常见问题

QtApng 用什么语言开发?

主要使用 C++ 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前有 106 个 Star。

QtApng 可以免费商用吗?

仓库采用 BSD 3-Clause "New" or "Revised" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 QtApng 的源码?

可以直接克隆仓库:git clone https://github.com/Skycoder42/QtApng.git,默认分支为 master;安装与运行步骤见仓库 README。

QtApng 最近还在维护吗?

仓库最近一次更新为 2022年1月29日,当前有 2 个未关闭 Issue;Star 数为 106,可作为社区活跃度的参考。

关于

An apng image plugin for Qt to support animated PNGs

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
187
价值分
75
活跃状态
归档

语言占比

C++
CMake
QMake

Release

README

QtApng

apng image plugin for Qt to support animated PNGs

CI build Codacy Badge AUR

Features

Enable the usage of apng images with Qt. The plugin adds the apng format as a new format for any Qt application, and thus supports loading of apng images via QMovie, AnimatedImage and other types.

Requirements

To build the plugin, libpng with the apng patch applied is required. By default the libpng provided by pkg-config is used for unix-like systems. If the library is not available, the project will compile a static library of libpng and embed it into the plugin. You can force this behaviour by running qmake with CONFIG += libpng_static

Embedded libpng/zlib

The project comes with a version of zlib and libpng (with the apng patch). They can be found in the src/3rdparty subfolder. They are automatically compiled into static libraries and used to link the apng plugin when neccessary. Please note that both libraries are compiled without any optimizations for architecture etc. If you wish to have those features, you can replace those two by your own versions.

Project Version License Project page
zlib 1.2.11 zlib-license https://www.zlib.net/
libpng 1.6.37 libpng-license http://www.libpng.org/pub/png/libpng.html
apng patch 1.6.37 libpng-license https://sourceforge.net/projects/libpng-apng/

Download/Installation

  1. Package Managers: The library is available via:
  2. Simply add my repository to your Qt MaintenanceTool (Image-based How-To here: Add custom repository):
    1. Start the MaintenanceTool from the commandline using /path/to/MaintenanceTool --addTempRepository <url> with one of the following urls (GUI-Method is currently broken, see QTIFW-1156) - This must be done every time you start the tool:
    2. A new entry appears under all supported Qt Versions (e.g. Qt > Qt 5.11 > Skycoder42 Qt modules)
    3. You can install either all of my modules, or select the one you need: Qt Apng Image Plugin
    4. Continue the setup and thats it! you can now use the module for all of your installed Kits for that Qt
  3. Download the compiled modules from the release page. Note: You will have to add the correct ones yourself and may need to adjust some paths to fit your installation! In addition to that, you will have to download the modules this one depends on as well. See Section “Requirements” below.
  4. Build it yourself! Note: This requires all build an runtime dependencies to be available (See Section “Requirements” below). If you don’t have/need cmake, you can ignore the related warnings. To automatically build and install to your Qt installation, run:
    • Download the sources. Either use git clone or download from the releases. If you choose the second option, you have to manually create a folder named .git in the projects root directory, otherwise the build will fail.
    • qmake
    • make (If you want the tests/examples/etc. run make all)
    • make install

Usage

Simply use the default Qt classes like QImageReader, QMovie etc. and open the apng files just like you would open normal images/animations (like gif files)

Format Detection: Since the png format is already used by Qt, *.png files will not use the plugin. To load a png as animated, you can either rename the file to *.apng, or set the format explicitly

QMovie movie("path/to/image.png", "apng");

评论

暂无评论