source: trunk/doc/html/qimageformat.html@ 190

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

reference documentation added

File size: 4.2 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:530 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QImageFormat 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>QImageFormat Class Reference</h1>
33
34<p>The QImageFormat class is an incremental image decoder for a specific image format.
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="qimageformat-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn>virtual int <a href="#decode"><b>decode</b></a> ( QImage&nbsp;&amp;&nbsp;img, QImageConsumer&nbsp;*&nbsp;consumer, const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length ) = 0</li>
41</ul>
42<hr><a name="details"></a><h2>Detailed Description</h2>
43
44
45The QImageFormat class is an incremental image decoder for a specific image format.
46<p>
47
48
49<p> By making a derived class of <a href="qimageformattype.html">QImageFormatType</a>, which in turn
50creates objects that are a subclass of QImageFormat, you can add
51support for more incremental image formats, allowing such formats
52to be sources for a <a href="qmovie.html">QMovie</a> or for the first frame of the image
53stream to be loaded as a <a href="qimage.html">QImage</a> or <a href="qpixmap.html">QPixmap</a>.
54<p> Your new subclass must reimplement the <a href="#decode">decode</a>() function in order
55to process your new format.
56<p> New QImageFormat objects are generated by new QImageFormatType
57factories.
58<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>.
59
60<hr><h2>Member Function Documentation</h2>
61<h3 class=fn>int <a name="decode"></a>QImageFormat::decode ( <a href="qimage.html">QImage</a>&nbsp;&amp;&nbsp;img, <a href="qimageconsumer.html">QImageConsumer</a>&nbsp;*&nbsp;consumer, const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )<tt> [pure virtual]</tt>
62</h3>
63
64<p> New subclasses must reimplement this method.
65<p> It should decode some or all of the bytes from <em>buffer</em> into <em>img</em>, calling the methods of <em>consumer</em> as the decoding proceeds
66to inform that consumer of changes to the image. The length of the
67data is given in <em>length</em>. The consumer may be 0, in which case
68the function should just process the data into <em>img</em> without
69telling any consumer about the changes. Note that the decoder must
70store enough state to be able to continue in subsequent calls to
71this method - this is the essence of the incremental image
72loading.
73<p> The function should return without processing all the data if it
74reaches the end of a frame in the input.
75<p> The function must return the number of bytes it has processed.
76
77<!-- eof -->
78<hr><p>
79This file is part of the <a href="index.html">Qt toolkit</a>.
80Copyright &copy; 1995-2007
81<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
82<table width=100% cellspacing=0 border=0><tr>
83<td>Copyright &copy; 2007
84<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
85<td align=right><div align=right>Qt 3.3.8</div>
86</table></div></address></body>
87</html>
Note: See TracBrowser for help on using the repository browser.