QImageFormatType(3qt)

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

πŸ’– 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 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