⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qimagedecoder.html

📁 QT 下载资料仅供参考
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/kernel/qasyncimageio.cpp:153 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QImageDecoder Class</title><style type="text/css"><!--h3.fn,span.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&nbsp;Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped&nbsp;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>QImageDecoder Class Reference</h1><p>The QImageDecoder class is an incremental image decoder for all supported image formats.<a href="#details">More...</a><p><tt>#include &lt;<a href="qasyncimageio-h.html">qasyncimageio.h</a>&gt;</tt><p><a href="qimagedecoder-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#QImageDecoder"><b>QImageDecoder</b></a> ( QImageConsumer&nbsp;*&nbsp;c )</div></li><li><div class=fn><a href="#~QImageDecoder"><b>~QImageDecoder</b></a> ()</div></li><li><div class=fn>const QImage &amp; <a href="#image"><b>image</b></a> ()</div></li><li><div class=fn>int <a href="#decode"><b>decode</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>const char * <a href="#formatName"><b>formatName</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )</div></li><li><div class=fn>QImageFormatType * <a href="#format"><b>format</b></a> ( const&nbsp;char&nbsp;*&nbsp;name )</div></li><li><div class=fn>QStrList <a href="#inputFormats"><b>inputFormats</b></a> ()</div></li><li><div class=fn>void <a href="#registerDecoderFactory"><b>registerDecoderFactory</b></a> ( QImageFormatType&nbsp;*&nbsp;f )</div></li><li><div class=fn>void <a href="#unregisterDecoderFactory"><b>unregisterDecoderFactory</b></a> ( QImageFormatType&nbsp;*&nbsp;f )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QImageDecoder class is an incremental image decoder for all supported image formats.<p> <p> New formats are installed by creating objects of class<a href="qimageformattype.html">QImageFormatType</a>; the <a href="qmovie.html">QMovie</a> class can be used for all installedincremental image formats. QImageDecoder is only useful forcreating new ways of feeding data to an <a href="qimageconsumer.html">QImageConsumer</a>.<p> A QImageDecoder is a machine that decodes images. It takes encodedimage data via its <a href="#decode">decode</a>() method and expresses its decoding bysupplying information to a QImageConsumer. It implements itsdecoding by using a <a href="qimageformat.html">QImageFormat</a> created by one of thecurrently-existing QImageFormatType factory objects.<p> QImageFormatType and QImageFormat are the classes that you mightneed to implement support for additional image formats.<p> <p> Qt supports GIF reading if it is configured that way duringinstallation (see qgif.h). If it is, we are required to state that"The Graphics Interchange Format(c) is the Copyright property ofCompuServe Incorporated. GIF(sm) is a Service Mark property ofCompuServe Incorporated."<p> <b>Warning:</b> If you are in a country that recognizes software patentsand in which Unisys holds a patent on LZW compression and/ordecompression and you want to use GIF, Unisys may require you tolicense 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 Qt.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><h3 class=fn><a name="QImageDecoder"></a>QImageDecoder::QImageDecoder ( <a href="qimageconsumer.html">QImageConsumer</a>&nbsp;*&nbsp;c )</h3>Constructs a QImageDecoder that will send change information tothe <a href="qimageconsumer.html">QImageConsumer</a> <em>c</em>.<h3 class=fn><a name="~QImageDecoder"></a>QImageDecoder::~QImageDecoder ()</h3>Destroys a QImageDecoder. The image it built is destroyed. Thedecoder built by the factory for the file format is destroyed. Theconsumer for which it decoded the image is <em>not</em> destroyed.<h3 class=fn>int <a name="decode"></a>QImageDecoder::decode ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )</h3>Call this function to decode some data into image changes. Thedata in <em>buffer</em> will be decoded, sending change information tothe <a href="qimageconsumer.html">QImageConsumer</a> of this QImageDecoder until one of the changefunctions of the consumer returns FALSE. The length of the data isgiven in <em>length</em>.<p> Returns the number of bytes consumed: 0 if consumption iscomplete, and -1 if decoding fails due to invalid data.<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></h3>Returns a <a href="qimageformattype.html">QImageFormatType</a> by name. This might be used when theuser needs to force data to be interpreted as being in a certainformat. <em>name</em> is one of the formats listed by<a href="#inputFormats">QImageDecoder::inputFormats</a>(). Note that you will still need tosupply decodable data to result->decoderFor() before you can begindecoding the data.<h3 class=fn>const char * <a name="formatName"></a>QImageDecoder::formatName ( const&nbsp;uchar&nbsp;*&nbsp;buffer, int&nbsp;length )<tt> [static]</tt></h3>Call this function to find the name of the format of the givenheader. The returned string is statically allocated. The functionwill look at the first <em>length</em> characters in the <em>buffer</em>.<p> Returns 0 if the format is not recognized.<h3 class=fn>const&nbsp;<a href="qimage.html">QImage</a>&nbsp;&amp; <a name="image"></a>QImageDecoder::image ()</h3><p> Returns the image currently being decoded.<h3 class=fn><a href="qstrlist.html">QStrList</a> <a name="inputFormats"></a>QImageDecoder::inputFormats ()<tt> [static]</tt></h3>Returns a sorted list of formats for which asynchronous loading issupported.<h3 class=fn>void <a name="registerDecoderFactory"></a>QImageDecoder::registerDecoderFactory ( <a href="qimageformattype.html">QImageFormatType</a>&nbsp;*&nbsp;f )<tt> [static]</tt></h3>Registers the new <a href="qimageformattype.html">QImageFormatType</a> <em>f</em>. This is not needed inapplication code because factories call this themselves.<h3 class=fn>void <a name="unregisterDecoderFactory"></a>QImageDecoder::unregisterDecoderFactory ( <a href="qimageformattype.html">QImageFormatType</a>&nbsp;*&nbsp;f )<tt> [static]</tt></h3>Unregisters the <a href="qimageformattype.html">QImageFormatType</a> <em>f</em>. This is not needed inapplication code because factories call this themselves.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright &copy; 1995-2002<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 &copy; 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -