1QImageDecoder(3qt) QImageDecoder(3qt)
2
3
4
6 QImageDecoder - Incremental image decoder for all supported image
7 formats
8
10 #include <qasyncimageio.h>
11
12 Public Members
13 QImageDecoder ( QImageConsumer * c )
14 ~QImageDecoder ()
15 const QImage & image ()
16 int decode ( const uchar * buffer, int length )
17
18 Static Public Members
19 const char * formatName ( const uchar * buffer, int length )
20 QImageFormatType * format ( const char * name )
21 QStrList inputFormats ()
22 void registerDecoderFactory ( QImageFormatType * f )
23 void unregisterDecoderFactory ( QImageFormatType * f )
24
26 The QImageDecoder class is an incremental image decoder for all
27 supported image formats.
28
29 New formats are installed by creating objects of class
30 QImageFormatType; the QMovie class can be used for all installed
31 incremental image formats. QImageDecoder is only useful for creating
32 new ways of feeding data to an QImageConsumer.
33
34 A QImageDecoder is a machine that decodes images. It takes encoded
35 image data via its decode() method and expresses its decoding by
36 supplying information to a QImageConsumer. It implements its decoding
37 by using a QImageFormat created by one of the currently-existing
38 QImageFormatType factory objects.
39
40 QImageFormatType and QImageFormat are the classes that you might need
41 to implement support for additional image formats.
42
43 Qt supports GIF reading if it is configured that way during
44 installation (see qgif.h). If it is, we are required to state that" The
45 Graphics Interchange Format(c) is the Copyright property of CompuServe
46 Incorporated. GIF(sm) is a Service Mark property of CompuServe
47 Incorporated."
48
49 Warning: If you are in a country that recognizes software patents and
50 in which Unisys holds a patent on LZW compression and/or decompression
51 and you want to use GIF, Unisys may require you to license that
52 technology. Such countries include Canada, Japan, the USA, France,
53 Germany, Italy and the UK.
54
55 GIF support may be removed completely in a future version of Qt. We
56 recommend using the MNG or PNG format.
57
58 See also Graphics Classes, Image Processing Classes, and Multimedia
59 Classes.
60
63 Constructs a QImageDecoder that will send change information to the
64 QImageConsumer c.
65
67 Destroys a QImageDecoder. The image it built is destroyed. The decoder
68 built by the factory for the file format is destroyed. The consumer for
69 which it decoded the image is not destroyed.
70
72 Call this function to decode some data into image changes. The data in
73 buffer will be decoded, sending change information to the
74 QImageConsumer of this QImageDecoder until one of the change functions
75 of the consumer returns FALSE. The length of the data is given in
76 length.
77
78 Returns the number of bytes consumed: 0 if consumption is complete, and
79 -1 if decoding fails due to invalid data.
80
82 Returns a QImageFormatType by name. This might be used when the user
83 needs to force data to be interpreted as being in a certain format.
84 name is one of the formats listed by QImageDecoder::inputFormats().
85 Note that you will still need to supply decodable data to
86 result->decoderFor() before you can begin decoding the data.
87
89 [static]
90 Call this function to find the name of the format of the given header.
91 The returned string is statically allocated. The function will look at
92 the first length characters in the buffer.
93
94 Returns 0 if the format is not recognized.
95
97 Returns the image currently being decoded.
98
100 Returns a sorted list of formats for which asynchronous loading is
101 supported.
102
104 Registers the new QImageFormatType f. This is not needed in application
105 code because factories call this themselves.
106
108
109 Unregisters the QImageFormatType f. This is not needed in application
110 code because factories call this themselves.
111
112
114 http://doc.trolltech.com/qimagedecoder.html
115 http://www.trolltech.com/faq/tech.html
116
118 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
119 license file included in the distribution for a complete license
120 statement.
121
123 Generated automatically from the source code.
124
126 If you find a bug in Qt, please report it as described in
127 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
128 help you. Thank you.
129
130 The definitive Qt documentation is provided in HTML format; it is
131 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
132 web browser. This man page is provided as a convenience for those users
133 who prefer man pages, although this format is not officially supported
134 by Trolltech.
135
136 If you find errors in this manual page, please report them to qt-
137 bugs@trolltech.com. Please include the name of the manual page
138 (qimagedecoder.3qt) and the Qt version (3.3.8).
139
140
141
142Trolltech AS 2 February 2007 QImageDecoder(3qt)