返回介绍

QPNGImagePacker Class

发布于 2019-10-04 15:02:00 字数 1766 浏览 1082 评论 0 收藏 0

The QPNGImagePacker class creates well-compressed PNG animations. More...

#include <qpngio.h>

List of all member functions.

Public Members

  • QPNGImagePacker ( QIODevice*iod, intstorage_depth, intconversionflags )
  • void setPixelAlignment ( intx )
  • bool packImage ( constQImage&img )

Detailed Description

The QPNGImagePacker class creates well-compressed PNG animations.

By using transparency, QPNGImagePacker allows you to build a PNG image from a sequence of QImages.

Images are added using packImage().

See also Graphics Classes and Image Processing Classes.


Member Function Documentation

QPNGImagePacker::QPNGImagePacker ( QIODevice*iod, intstorage_depth, intconversionflags )

Creates an image packer that writes PNG data to IO device iod using a storage_depth bit encoding (use 8 or 32, depending on the desired quality and compression requirements).

If the image needs to be modified to fit in a lower-resolution result (e.g. converting from 32-bit to 8-bit), use the conversionflags to specify how you'd prefer this to happen.

See also Qt::ImageConversionFlags.

bool QPNGImagePacker::packImage ( constQImage&img )

Adds the image img to the PNG animation, analyzing the differences between this and the previous image to improve compression.

void QPNGImagePacker::setPixelAlignment ( intx )

Aligns pixel differences to x pixels. For example, using 8 can improve playback on certain hardware. Normally the default of 1-pixel alignment (i.e. no alignment) gives better compression and performance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文