source: trunk/doc/html/qimagedecoder.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 8.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qasyncimageio.cpp:153 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QImageDecoder Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QImageDecoder Class Reference</h1>
33
34<p>The QImageDecoder class is an incremental image decoder for all supported image formats.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qasyncimageio-h.html">qasyncimageio.h</a>&gt;</tt>
37<p><a href="qimagedecoder-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn><a href="#QImageDecoder"><b>QImageDecoder</b></a> ( QImageConsumer&nbsp;*&nbsp;c )</li>
41<li class=fn><a href="#~QImageDecoder"><b>~QImageDecoder</b></a> ()</li>
42<li class=fn>const QImage &amp; <a href="#image"><b>image</b></a> ()</li>
43<li class=fn>int <a href="#decode"><b>decode</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )</li>
44</ul>
45<h2>Static Public Members</h2>
46<ul>
47<li class=fn>const char * <a href="#formatName"><b>formatName</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )</li>
48<li class=fn>QImageFormatType * <a href="#format"><b>format</b></a> ( const&nbsp;char&nbsp;*&nbsp;name )</li>
49<li class=fn>QStrList <a href="#inputFormats"><b>inputFormats</b></a> ()</li>
50<li class=fn>void <a href="#registerDecoderFactory"><b>registerDecoderFactory</b></a> ( QImageFormatType&nbsp;*&nbsp;f )</li>
51<li class=fn>void <a href="#unregisterDecoderFactory"><b>unregisterDecoderFactory</b></a> ( QImageFormatType&nbsp;*&nbsp;f )</li>
52</ul>
53<hr><a name="details"></a><h2>Detailed Description</h2>
54
55
56The QImageDecoder class is an incremental image decoder for all supported image formats.
57<p>
58
59
60<p> New formats are installed by creating objects of class
61<a href="qimageformattype.html">QImageFormatType</a>; the <a href="qmovie.html">QMovie</a> class can be used for all installed
62incremental image formats. QImageDecoder is only useful for
63creating new ways of feeding data to an <a href="qimageconsumer.html">QImageConsumer</a>.
64<p> A QImageDecoder is a machine that decodes images. It takes encoded
65image data via its <a href="#decode">decode</a>() method and expresses its decoding by
66supplying information to a QImageConsumer. It implements its
67decoding by using a <a href="qimageformat.html">QImageFormat</a> created by one of the
68currently-existing QImageFormatType factory objects.
69<p> QImageFormatType and QImageFormat are the classes that you might
70need to implement support for additional image formats.
71<p>
72<p> Qt supports GIF reading if it is configured that way during
73installation (see qgif.h). If it is, we are required to state that
74"The Graphics Interchange Format(c) is the Copyright property of
75CompuServe Incorporated. GIF(sm) is a Service Mark property of
76CompuServe Incorporated."
77<p> <b>Warning:</b> If you are in a country that recognizes software patents
78and in which Unisys holds a patent on LZW compression and/or
79decompression and you want to use GIF, Unisys may require you to
80license that technology. Such countries include Canada, Japan,
81the USA, France, Germany, Italy and the UK.
82<p> GIF support may be removed completely in a future version of Qt.
83We recommend using the MNG or PNG format.
84<p>See also <a href="graphics.html">Graphics Classes</a>, <a href="images.html">Image Processing Classes</a>, and <a href="multimedia.html">Multimedia Classes</a>.
85
86<hr><h2>Member Function Documentation</h2>
87<h3 class=fn><a name="QImageDecoder"></a>QImageDecoder::QImageDecoder ( <a href="qimageconsumer.html">QImageConsumer</a>&nbsp;*&nbsp;c )
88</h3>
89Constructs a QImageDecoder that will send change information to
90the <a href="qimageconsumer.html">QImageConsumer</a> <em>c</em>.
91
92<h3 class=fn><a name="~QImageDecoder"></a>QImageDecoder::~QImageDecoder ()
93</h3>
94Destroys a QImageDecoder. The image it built is destroyed. The
95decoder built by the factory for the file format is destroyed. The
96consumer for which it decoded the image is <em>not</em> destroyed.
97
98<h3 class=fn>int <a name="decode"></a>QImageDecoder::decode ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )
99</h3>
100Call this function to decode some data into image changes. The
101data in <em>buffer</em> will be decoded, sending change information to
102the <a href="qimageconsumer.html">QImageConsumer</a> of this QImageDecoder until one of the change
103functions of the consumer returns FALSE. The length of the data is
104given in <em>length</em>.
105<p> Returns the number of bytes consumed: 0 if consumption is
106complete, and -1 if decoding fails due to invalid data.
107
108<h3 class=fn><a href="qimageformattype.html">QImageFormatType</a>&nbsp;* <a name="format"></a>QImageDecoder::format ( const&nbsp;char&nbsp;*&nbsp;name )<tt> [static]</tt>
109</h3>
110Returns a <a href="qimageformattype.html">QImageFormatType</a> by name. This might be used when the
111user needs to force data to be interpreted as being in a certain
112format. <em>name</em> is one of the formats listed by
113<a href="#inputFormats">QImageDecoder::inputFormats</a>(). Note that you will still need to
114supply decodable data to result->decoderFor() before you can begin
115decoding the data.
116
117<h3 class=fn>const char * <a name="formatName"></a>QImageDecoder::formatName ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )<tt> [static]</tt>
118</h3>
119Call this function to find the name of the format of the given
120header. The returned string is statically allocated. The function
121will look at the first <em>length</em> characters in the <em>buffer</em>.
122<p> Returns 0 if the format is not recognized.
123
124<h3 class=fn>const&nbsp;<a href="qimage.html">QImage</a>&nbsp;&amp; <a name="image"></a>QImageDecoder::image ()
125</h3>
126
127<p> Returns the image currently being decoded.
128
129<h3 class=fn><a href="qstrlist.html">QStrList</a> <a name="inputFormats"></a>QImageDecoder::inputFormats ()<tt> [static]</tt>
130</h3>
131Returns a sorted list of formats for which asynchronous loading is
132supported.
133
134<h3 class=fn>void <a name="registerDecoderFactory"></a>QImageDecoder::registerDecoderFactory ( <a href="qimageformattype.html">QImageFormatType</a>&nbsp;*&nbsp;f )<tt> [static]</tt>
135</h3>
136Registers the new <a href="qimageformattype.html">QImageFormatType</a> <em>f</em>. This is not needed in
137application code because factories call this themselves.
138
139<h3 class=fn>void <a name="unregisterDecoderFactory"></a>QImageDecoder::unregisterDecoderFactory ( <a href="qimageformattype.html">QImageFormatType</a>&nbsp;*&nbsp;f )<tt> [static]</tt>
140</h3>
141Unregisters the <a href="qimageformattype.html">QImageFormatType</a> <em>f</em>. This is not needed in
142application code because factories call this themselves.
143
144<!-- eof -->
145<hr><p>
146This file is part of the <a href="index.html">Qt toolkit</a>.
147Copyright &copy; 1995-2007
148<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
149<table width=100% cellspacing=0 border=0><tr>
150<td>Copyright &copy; 2007
151<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
152<td align=right><div align=right>Qt 3.3.8</div>
153</table></div></address></body>
154</html>
Note: See TracBrowser for help on using the repository browser.