QImageDecoder(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QImageDecoder πŸ’–

okay bestie, we're doing QImageDecoder from the Qt 3 manual pages (3qt section), and she is iconic but also a little niche, so buckle up πŸŽ€


✨ NAME ✨

QImageDecoder β€” an incremental image decoder for all the supported image formats. yes, all of them. no cap. πŸ‘‘


✨ SYNOPSIS ✨

#include <qasyncimageio.h>

🫢 Public Members

  • QImageDecoder ( QImageConsumer * c )
  • ~QImageDecoder ()
  • const QImage & image ()
  • int decode ( const uchar * buffer, int length )

🌟 Static Public Members

  • const char * formatName ( const uchar * buffer, int length )
  • QImageFormatType * format ( const char * name )
  • QStrList inputFormats ()
  • void registerDecoderFactory ( QImageFormatType * f )
  • void unregisterDecoderFactory ( QImageFormatType * f )

🌈 DESCRIPTION 🌈

So the QImageDecoder class is an incremental image decoder for all supported image formats. literally what it says on the tin, and she delivers.

New formats get installed by creating objects of class QImageFormatType; the QMovie class can be used for all installed incremental image formats. QImageDecoder is only useful for creating new ways of feeding data to an QImageConsumer. (iykyk πŸ’…)

A QImageDecoder is a machine that decodes images. it takes encoded image data via its decode() method and expresses its decoding by supplying information to a QImageConsumer. It implements its decoding by using a QImageFormat created by one of the currently-existing QImageFormatType factory objects. main character energy fr fr ✨

QImageFormatType and QImageFormat are the classes that you might need to implement support for additional image formats. that's the assignment, bestie.

Qt supports GIF reading if it is configured that way during installation (see qgif.h). If it is, we are required to state that

"The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated."
⚠️ Warning: If you are in a country that recognizes software patents and in which Unisys holds a patent on LZW compression and/or decompression and you want to use GIF, Unisys may require you to license that technology. Such countries include Canada, Japan, the USA, France, Germany, Italy and the UK. πŸ’€

GIF support may be removed completely in a future version of Qt. We recommend using the MNG or PNG format. πŸ¦‹

See also Graphics Classes, Image Processing Classes, and Multimedia Classes.


πŸŽ€ MEMBER FUNCTION DOCUMENTATION πŸŽ€

QImageDecoder::QImageDecoder ( QImageConsumer * c )

Constructs a QImageDecoder that will send change information to the QImageConsumer c. that's it, that's the whole vibe. πŸ’œ

QImageDecoder::~QImageDecoder ()

Destroys a QImageDecoder. The image it built is destroyed. The decoder built by the factory for the file format is destroyed. The consumer for which it decoded the image is not destroyed. (the consumer survives, she's resilient like that πŸ™ˆ)

int QImageDecoder::decode ( const uchar * buffer, int length )

Call this function to decode some data into image changes. The data in buffer will be decoded, sending change information to the QImageConsumer of this QImageDecoder until one of the change functions of the consumer returns FALSE. The length of the data is given in length.

Returns the number of bytes consumed: 0 if consumption is complete, and -1 if decoding fails due to invalid data. so -1 = it's giving error, watch out 🚨

QImageFormatType * QImageDecoder::format ( const char * name ) [static]

Returns a QImageFormatType by name. This might be used when the user needs to force data to be interpreted as being in a certain format. name is one of the formats listed by QImageDecoder::inputFormats(). Note that you will still need to supply decodable data to result->decoderFor() before you can begin decoding the data. yes, the extra step is mandatory, sorry bestie 😭

const char * QImageDecoder::formatName ( const uchar * buffer, int length ) [static]

Call this function to find the name of the format of the given header. The returned string is statically allocated. The function will look at the first length characters in the buffer.

Returns 0 if the format is not recognized. unrecognized format = it simply said no πŸ’…

const QImage & QImageDecoder::image ()

Returns the image currently being decoded. like, right this second. ✨

QStrList QImageDecoder::inputFormats () [static]

Returns a sorted list of formats for which asynchronous loading is supported. sorted, bestie, we love a tidy list πŸŽ€

void QImageDecoder::registerDecoderFactory ( QImageFormatType * f ) [static]

Registers the new QImageFormatType f. This is not needed in application code because factories call this themselves. so don't do it manually, they handle their own business 🫢

void QImageDecoder::unregisterDecoderFactory ( QImageFormatType * f ) [static]

Unregisters the QImageFormatType f. This is not needed in application code because factories call this themselves. same deal, let them cook πŸ“


🌸 SEE ALSO 🌸


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


⭐ AUTHOR ⭐

Generated automatically from the source code. (not me though, i wrote this version, with love 🫢)


🧚 BUGS 🧚

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. πŸ™

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qimagedecoder.3qt) and the Qt version (3.3.8). πŸ‘‘


and that's the whole page bestie, written by Trolltech AS on 2 February 2007 for QImageDecoder(3qt) β€” love that for us, periodt πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from