1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
'\" t
.TH TQImageDecoder 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQImageDecoder \- Incremental image decoder for all supported image formats
.SH SYNOPSIS
\fC#include <ntqasyncimageio.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQImageDecoder\fR ( TQImageConsumer * c )"
.br
.ti -1c
.BI "\fB~TQImageDecoder\fR ()"
.br
.ti -1c
.BI "const TQImage & \fBimage\fR ()"
.br
.ti -1c
.BI "int \fBdecode\fR ( const uchar * buffer, int length )"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "const char * \fBformatName\fR ( const uchar * buffer, int length )"
.br
.ti -1c
.BI "TQImageFormatType * \fBformat\fR ( const char * name )"
.br
.ti -1c
.BI "TQStrList \fBinputFormats\fR ()"
.br
.ti -1c
.BI "void \fBregisterDecoderFactory\fR ( TQImageFormatType * f )"
.br
.ti -1c
.BI "void \fBunregisterDecoderFactory\fR ( TQImageFormatType * f )"
.br
.in -1c
.SH DESCRIPTION
The TQImageDecoder class is an incremental image decoder for all supported image formats.
.PP
New formats are installed by creating objects of class TQImageFormatType; the TQMovie class can be used for all installed incremental image formats. TQImageDecoder is only useful for creating new ways of feeding data to an TQImageConsumer.
.PP
A TQImageDecoder is a machine that decodes images. It takes encoded image data via its decode() method and expresses its decoding by supplying information to a TQImageConsumer. It implements its decoding by using a TQImageFormat created by one of the currently-existing TQImageFormatType factory objects.
.PP
TQImageFormatType and TQImageFormat are the classes that you might need to implement support for additional image formats.
.PP
Qt supports GIF reading if it is configured that way during installation (see ntqgif.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."
.PP
\fBWarning:\fR 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.
.PP
GIF support may be removed completely in a future version of Qt. We recommend using the MNG or PNG format.
.PP
See also Graphics Classes, Image Processing Classes, and Multimedia Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQImageDecoder::TQImageDecoder ( TQImageConsumer * c )"
Constructs a TQImageDecoder that will send change information to the TQImageConsumer \fIc\fR.
.SH "TQImageDecoder::~TQImageDecoder ()"
Destroys a TQImageDecoder. 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 \fInot\fR destroyed.
.SH "int TQImageDecoder::decode ( const uchar * buffer, int length )"
Call this function to decode some data into image changes. The data in \fIbuffer\fR will be decoded, sending change information to the TQImageConsumer of this TQImageDecoder until one of the change functions of the consumer returns FALSE. The length of the data is given in \fIlength\fR.
.PP
Returns the number of bytes consumed: 0 if consumption is complete, and -1 if decoding fails due to invalid data.
.SH "TQImageFormatType * TQImageDecoder::format ( const char * name )\fC [static]\fR"
Returns a TQImageFormatType by name. This might be used when the user needs to force data to be interpreted as being in a certain format. \fIname\fR is one of the formats listed by TQImageDecoder::inputFormats(). Note that you will still need to supply decodable data to result->decoderFor() before you can begin decoding the data.
.SH "const char * TQImageDecoder::formatName ( const uchar * buffer, int length )\fC [static]\fR"
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 \fIlength\fR characters in the \fIbuffer\fR.
.PP
Returns 0 if the format is not recognized.
.SH "const TQImage & TQImageDecoder::image ()"
Returns the image currently being decoded.
.SH "TQStrList TQImageDecoder::inputFormats ()\fC [static]\fR"
Returns a sorted list of formats for which asynchronous loading is supported.
.SH "void TQImageDecoder::registerDecoderFactory ( TQImageFormatType * f )\fC [static]\fR"
Registers the new TQImageFormatType \fIf\fR. This is not needed in application code because factories call this themselves.
.SH "void TQImageDecoder::unregisterDecoderFactory ( TQImageFormatType * f )\fC [static]\fR"
Unregisters the TQImageFormatType \fIf\fR. This is not needed in
application code because factories call this themselves.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqimagedecoder.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt 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.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqimagedecoder.3qt) and the Qt
version (3.3.8).
|