Qt 6.x
The Qt SDK
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 326 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 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().

+ 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 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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