![]() |
Qt 6.x
The Qt SDK
|
Public Member Functions | |
Jpeg2000JasperReader (QIODevice *iod, const SubFormat format=Jp2Format) | |
~Jpeg2000JasperReader () | |
bool | read (QImage *pImage) |
bool | write (const QImage &image, int quality) |
Opens the file data and attempts to decode it using the Jasper library. | |
Definition at line 42 of file qjp2handler.cpp.
Construct a Jpeg2000JasperReader using the provided imageIO. Note that currently the jasper library is initialized in this constructor, (and freed in the destructor) which means that:
Definition at line 298 of file qjp2handler.cpp.
References QImageReader::allocationLimit(), and qDebug.
Jpeg2000JasperReader::~Jpeg2000JasperReader | ( | ) |
Definition at line 326 of file qjp2handler.cpp.
References qDebug.
bool Jpeg2000JasperReader::read | ( | QImage * | pImage | ) |
Opens the file data and attempts to decode it using the Jasper library. Returns true if successful, false on failure
Definition at line 347 of file qjp2handler.cpp.
References QImageIOHandler::allocateImage(), QByteArray::data(), QImage::Format_ARGB32, QImage::Format_Grayscale8, QImage::Format_Invalid, QImage::Format_RGB32, imageData, qDebug, QIODevice::readAll(), and QByteArray::size().
bool Jpeg2000JasperReader::write | ( | const QImage & | image, |
int | quality | ||
) |
Opens the file data and attempts to decode it using the Jasper library.
Returns true on success, false on failure.
32-bit and color mapped color images are encoded as RGB images, color mapped grayscale images are encoded as grayscale images
Definition at line 756 of file qjp2handler.cpp.
References QImage::allGray(), QString::arg(), QByteArray::constData(), QImage::depth(), QImage::hasAlphaChannel(), QImage::height(), Jp2Format, qDebug, qstrdup(), str, QString::toLatin1(), QImage::width(), and QIODevice::write().
Referenced by QJp2Handler::write().