QImageFormatType(3qt)
π QImageFormatType(3qt) π
okay bestie, welcome to the QImageFormatType page from the 3qt manual, brought to you by the fine folks at Trolltech β¨ pull up a chair, this one's actually kinda cute and small.
πΈ NAME πΈ
QImageFormatType β the factory that makes QImageFormat objects, no cap ππ
π SYNOPSIS π
#include <qasyncimageio.h>
β¨ Public Members β¨
virtual ~QImageFormatType ()
virtual QImageFormat * decoderFor ( const uchar * buffer, int length ) = 0
virtual const char * formatName () const = 0
π«Ά Protected Members π«Ά
QImageFormatType ()
π¦ DESCRIPTION π¦
So the QImageFormatType class is, like, a factory that makes QImageFormat objects. that's the whole job description, she's got one task and she does it flawlessly π
Here's the tea tho β where QImageIO lets you load a whole image in one go, QImageFormatType is the one who lets you load images incrementally. little sips, not the whole thing at once. main character behavior tbh ββ¨
New image file formats get installed by making objects of derived classes of QImageFormatType. and if you're gonna do that, you MUST implement decoderFor() and formatName(). no skipping, bestie, those are literally the only two things she asks of you π
QImageFormatType is a very simple class. like, refreshingly simple. her one and only task is to recognize image data in some format and then make a new object, subclassed from QImageFormat, which can decode that format. that's it. that's the vibe check and she passed π―
The factories for formats built into Qt are automatically defined before any other factory is initialized. and here's the plot twist: if two factories would recognize an image format, the factory created last will override the earlier one. so you can legit override current AND future built-in formats. you have that power, use it responsibly π
ngl that override thing is lowkey iconic. you can just walk in and take over a format. slay.
See also Graphics Classes, Image Processing Classes, and Multimedia Classes. π
π₯ MEMBER FUNCTION DOCUMENTATION π₯
QImageFormatType::QImageFormatType () [protected]
Constructs a factory. and the way she automatically registers herself with QImageDecoder?? no extra steps, no setup calls, she just shows up and is registered. self-sufficient queen πβ¨
QImageFormatType::~QImageFormatType () [virtual]
Destroys a factory. and yes, she automatically unregisters herself from QImageDecoder on the way out. clean exit, no loose ends, we love a graceful goodbye π₯Ήπ
QImageFormat * QImageFormatType::decoderFor ( const uchar * buffer, int length ) [pure virtual]
Returns a decoder for decoding an image that starts with the bytes in buffer. The length of the data is given in length.
okay here's the important part, bestie, listen up π’ this function should only return a decoder if it is certain that the decoder applies to data with the given header. don't be out here guessing, that's not the vibe.
It returns 0 if there is insufficient data in the header to make a positive identification, or if the data is not recognized. so 0 means "idk yet" or "nope, not mine" β either way, don't panic, just return 0 π«Ά
const char * QImageFormatType::formatName () const [pure virtual]
Returns the name of the format supported by decoders from this factory. and heads up: the string is statically allocated, so don't go freeing it or whatever. it's not yours, it's hers π
π SEE ALSO π
π COPYRIGHT π
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 a human, just a lil robot doing its thing π€π)
π 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. π (fr fr, good bug reports are a love language π)
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. so like... it's a vibe, not a contract, yk? π
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qimageformattype.3qt) and the Qt version (3.3.8). π«Ά
and that's the whole page bestie!! this one came from Trolltech AS, dated 2 February 2007, and it's the QImageFormatType(3qt) manual page. go forth and build factories, you got this π
β¨π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms