Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
Jpeg2000JasperReader Class Reference
+ Collaboration diagram for Jpeg2000JasperReader:

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.
 

Detailed Description

Definition at line 42 of file qjp2handler.cpp.

Constructor & Destructor Documentation

◆ Jpeg2000JasperReader()

Jpeg2000JasperReader::Jpeg2000JasperReader ( QIODevice * iod,
const SubFormat format = Jp2Format )

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:

  • Only one instance of this class may exist at one time
  • No thread safety

Definition at line 298 of file qjp2handler.cpp.

References QImageReader::allocationLimit(), and qDebug.

+ Here is the call graph for this function:

◆ ~Jpeg2000JasperReader()

Jpeg2000JasperReader::~Jpeg2000JasperReader ( )

Definition at line 327 of file qjp2handler.cpp.

References qDebug.

Member Function Documentation

◆ read()

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 348 of file qjp2handler.cpp.

References QImageIOHandler::allocateImage(), QImage::Format_ARGB32, QImage::Format_Grayscale8, QImage::Format_Invalid, QImage::Format_RGB32, imageData, qDebug, and QIODevice::readAll().

+ Here is the call graph for this function:

◆ write()

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 757 of file qjp2handler.cpp.

References QImage::allGray(), QString::arg(), QImage::depth(), QImage::hasAlphaChannel(), QImage::height(), Jp2Format, qDebug, qstrdup(), str, QImage::width(), and QIODevice::write().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: