You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
155 lines
8.0 KiB
155 lines
8.0 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qasyncimageio.cpp:153 -->
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQImageDecoder Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQImageDecoder Class Reference</h1>
|
||
|
|
||
|
<p>The TQImageDecoder class is an incremental image decoder for all supported image formats.
|
||
|
<a href="#details">More...</a>
|
||
13 years ago
|
<p><tt>#include <<a href="qasyncimageio-h.html">ntqasyncimageio.h</a>></tt>
|
||
6 months ago
|
<p><a href="tqimagedecoder-members.html">List of all member functions.</a>
|
||
13 years ago
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQImageDecoder"><b>TQImageDecoder</b></a> ( TQImageConsumer * c )</li>
|
||
|
<li class=fn><a href="#~TQImageDecoder"><b>~TQImageDecoder</b></a> ()</li>
|
||
|
<li class=fn>const TQImage & <a href="#image"><b>image</b></a> ()</li>
|
||
|
<li class=fn>int <a href="#decode"><b>decode</b></a> ( const uchar * buffer, int length )</li>
|
||
|
</ul>
|
||
|
<h2>Static Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn>const char * <a href="#formatName"><b>formatName</b></a> ( const uchar * buffer, int length )</li>
|
||
|
<li class=fn>TQImageFormatType * <a href="#format"><b>format</b></a> ( const char * name )</li>
|
||
|
<li class=fn>TQStrList <a href="#inputFormats"><b>inputFormats</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#registerDecoderFactory"><b>registerDecoderFactory</b></a> ( TQImageFormatType * f )</li>
|
||
|
<li class=fn>void <a href="#unregisterDecoderFactory"><b>unregisterDecoderFactory</b></a> ( TQImageFormatType * f )</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
The TQImageDecoder class is an incremental image decoder for all supported image formats.
|
||
|
<p>
|
||
|
|
||
|
|
||
|
<p> New formats are installed by creating objects of class
|
||
6 months ago
|
<a href="tqimageformattype.html">TQImageFormatType</a>; the <a href="ntqmovie.html">TQMovie</a> class can be used for all installed
|
||
13 years ago
|
incremental image formats. TQImageDecoder is only useful for
|
||
6 months ago
|
creating new ways of feeding data to an <a href="tqimageconsumer.html">TQImageConsumer</a>.
|
||
13 years ago
|
<p> A TQImageDecoder is a machine that decodes images. It takes encoded
|
||
|
image data via its <a href="#decode">decode</a>() method and expresses its decoding by
|
||
|
supplying information to a TQImageConsumer. It implements its
|
||
6 months ago
|
decoding by using a <a href="tqimageformat.html">TQImageFormat</a> created by one of the
|
||
13 years ago
|
currently-existing TQImageFormatType factory objects.
|
||
|
<p> TQImageFormatType and TQImageFormat are the classes that you might
|
||
|
need to implement support for additional image formats.
|
||
|
<p>
|
||
|
<p> TQt supports GIF reading if it is configured that way during
|
||
13 years ago
|
installation (see ntqgif.h). If it is, we are required to state that
|
||
13 years ago
|
"The Graphics Interchange Format(c) is the Copyright property of
|
||
|
CompuServe Incorporated. GIF(sm) is a Service Mark property of
|
||
|
CompuServe Incorporated."
|
||
|
<p> <b>Warning:</b> If you are in a country that recognizes software patents
|
||
|
and in which Unisys holds a patent on LZW compression and/or
|
||
13 years ago
|
decompression and you want to use GIF, Unisys may require you to
|
||
13 years ago
|
license that technology. Such countries include Canada, Japan,
|
||
|
the USA, France, Germany, Italy and the UK.
|
||
|
<p> GIF support may be removed completely in a future version of TQt.
|
||
|
We recommend using the MNG or PNG format.
|
||
|
<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>.
|
||
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
6 months ago
|
<h3 class=fn><a name="TQImageDecoder"></a>TQImageDecoder::TQImageDecoder ( <a href="tqimageconsumer.html">TQImageConsumer</a> * c )
|
||
13 years ago
|
</h3>
|
||
|
Constructs a TQImageDecoder that will send change information to
|
||
6 months ago
|
the <a href="tqimageconsumer.html">TQImageConsumer</a> <em>c</em>.
|
||
13 years ago
|
|
||
|
<h3 class=fn><a name="~TQImageDecoder"></a>TQImageDecoder::~TQImageDecoder ()
|
||
|
</h3>
|
||
|
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 <em>not</em> destroyed.
|
||
|
|
||
|
<h3 class=fn>int <a name="decode"></a>TQImageDecoder::decode ( const uchar * buffer, int length )
|
||
|
</h3>
|
||
|
Call this function to decode some data into image changes. The
|
||
|
data in <em>buffer</em> will be decoded, sending change information to
|
||
6 months ago
|
the <a href="tqimageconsumer.html">TQImageConsumer</a> of this TQImageDecoder until one of the change
|
||
13 years ago
|
functions of the consumer returns FALSE. The length of the data is
|
||
|
given in <em>length</em>.
|
||
|
<p> Returns the number of bytes consumed: 0 if consumption is
|
||
|
complete, and -1 if decoding fails due to invalid data.
|
||
|
|
||
6 months ago
|
<h3 class=fn><a href="tqimageformattype.html">TQImageFormatType</a> * <a name="format"></a>TQImageDecoder::format ( const char * name )<tt> [static]</tt>
|
||
13 years ago
|
</h3>
|
||
6 months ago
|
Returns a <a href="tqimageformattype.html">TQImageFormatType</a> by name. This might be used when the
|
||
13 years ago
|
user needs to force data to be interpreted as being in a certain
|
||
|
format. <em>name</em> is one of the formats listed by
|
||
|
<a href="#inputFormats">TQImageDecoder::inputFormats</a>(). Note that you will still need to
|
||
|
supply decodable data to result->decoderFor() before you can begin
|
||
|
decoding the data.
|
||
|
|
||
|
<h3 class=fn>const char * <a name="formatName"></a>TQImageDecoder::formatName ( const uchar * buffer, int length )<tt> [static]</tt>
|
||
|
</h3>
|
||
|
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 <em>length</em> characters in the <em>buffer</em>.
|
||
|
<p> Returns 0 if the format is not recognized.
|
||
|
|
||
6 months ago
|
<h3 class=fn>const <a href="tqimage.html">TQImage</a> & <a name="image"></a>TQImageDecoder::image ()
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the image currently being decoded.
|
||
|
|
||
13 years ago
|
<h3 class=fn><a href="ntqstrlist.html">TQStrList</a> <a name="inputFormats"></a>TQImageDecoder::inputFormats ()<tt> [static]</tt>
|
||
13 years ago
|
</h3>
|
||
|
Returns a sorted list of formats for which asynchronous loading is
|
||
|
supported.
|
||
|
|
||
6 months ago
|
<h3 class=fn>void <a name="registerDecoderFactory"></a>TQImageDecoder::registerDecoderFactory ( <a href="tqimageformattype.html">TQImageFormatType</a> * f )<tt> [static]</tt>
|
||
13 years ago
|
</h3>
|
||
6 months ago
|
Registers the new <a href="tqimageformattype.html">TQImageFormatType</a> <em>f</em>. This is not needed in
|
||
13 years ago
|
application code because factories call this themselves.
|
||
|
|
||
6 months ago
|
<h3 class=fn>void <a name="unregisterDecoderFactory"></a>TQImageDecoder::unregisterDecoderFactory ( <a href="tqimageformattype.html">TQImageFormatType</a> * f )<tt> [static]</tt>
|
||
13 years ago
|
</h3>
|
||
6 months ago
|
Unregisters the <a href="tqimageformattype.html">TQImageFormatType</a> <em>f</em>. This is not needed in
|
||
13 years ago
|
application code because factories call this themselves.
|
||
|
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|