<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Exiv2: Exiv2::Internal::PngChunk Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceExiv2.html">Exiv2</a>::<a class="el" href="namespaceExiv2_1_1Internal.html">Internal</a>::<a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html">PngChunk</a> </div> </div> <div class="contents"> <h1>Exiv2::Internal::PngChunk Class Reference</h1><!-- doxytag: class="Exiv2::Internal::PngChunk" -->Stateless parser class for data in PNG chunk format. Images use this class to decode and encode PNG-based data. <a href="#_details">More...</a> <p> <code>#include <pngchunk_int.hpp></code> <p> <p> <a href="classExiv2_1_1Internal_1_1PngChunk-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#9a05f1f7d1b88f8e869813f6b318fd35">TxtChunkType</a> { <b>tEXt_Chunk</b> = 0, <b>zTXt_Chunk</b> = 1, <b>iTXt_Chunk</b> = 2 }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Text Chunk types. <br></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#95c8bcca87e7e7b73466a024d36abdc2">decodeIHDRChunk</a> (const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> &data, int *outWidth, int *outHeight)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode PNG IHDR chunk data from a data buffer <em>data</em> and return image size to <em>outWidth</em> and <em>outHeight</em>. <a href="#95c8bcca87e7e7b73466a024d36abdc2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#a0d25553b739b31d23f3c63f89f84dc7">decodeTXTChunk</a> (<a class="el" href="classExiv2_1_1Image.html">Image</a> *pImage, const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> &data, <a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#9a05f1f7d1b88f8e869813f6b318fd35">TxtChunkType</a> type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode PNG tEXt, zTXt, or iTXt chunk data from <em>pImage</em> passed by data buffer <em>data</em> and extract Comment, Exif, Iptc, Xmp metadata accordingly. <a href="#a0d25553b739b31d23f3c63f89f84dc7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#03608e8b2950d894bc52c8c0bca3df77">keyTXTChunk</a> (const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> &data, bool stripHeader=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return PNG TXT chunk key as data buffer. <a href="#03608e8b2950d894bc52c8c0bca3df77"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#f11fcb9508b26ea787bfb539fc69d350">makeMetadataChunk</a> (const std::string &metadata, <a class="el" href="namespaceExiv2.html#cca494c8cf80f3ac8a804e1b54afffca">MetadataId</a> type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a complete PNG chunk data compressed or not as buffer. Data returned is formated accordingly with metadata <em>type</em> to host passed by <em>metadata</em>. <a href="#f11fcb9508b26ea787bfb539fc69d350"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Stateless parser class for data in PNG chunk format. Images use this class to decode and encode PNG-based data. <hr><h2>Member Function Documentation</h2> <a class="anchor" name="95c8bcca87e7e7b73466a024d36abdc2"></a><!-- doxytag: member="Exiv2::Internal::PngChunk::decodeIHDRChunk" ref="95c8bcca87e7e7b73466a024d36abdc2" args="(const DataBuf &data, int *outWidth, int *outHeight)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Exiv2::Internal::PngChunk::decodeIHDRChunk </td> <td>(</td> <td class="paramtype">const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> & </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>outWidth</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>outHeight</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Decode PNG IHDR chunk data from a data buffer <em>data</em> and return image size to <em>outWidth</em> and <em>outHeight</em>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>PNG Chunk data buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>outWidth</em> </td><td>Integer pointer to be set to the width of the image. </td></tr> <tr><td valign="top"></td><td valign="top"><em>outHeight</em> </td><td>Integer pointer to be set to the height of the image. </td></tr> </table> </dl> <p>References <a class="el" href="types_8cpp_source.html#l00220">Exiv2::getLong()</a>, and <a class="el" href="types_8hpp_source.html#l00258">Exiv2::DataBuf::pData_</a>.</p> <p>Referenced by <a class="el" href="pngimage_8cpp_source.html#l00098">Exiv2::PngImage::readMetadata()</a>.</p> </div> </div><p> <a class="anchor" name="a0d25553b739b31d23f3c63f89f84dc7"></a><!-- doxytag: member="Exiv2::Internal::PngChunk::decodeTXTChunk" ref="a0d25553b739b31d23f3c63f89f84dc7" args="(Image *pImage, const DataBuf &data, TxtChunkType type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Exiv2::Internal::PngChunk::decodeTXTChunk </td> <td>(</td> <td class="paramtype"><a class="el" href="classExiv2_1_1Image.html">Image</a> * </td> <td class="paramname"> <em>pImage</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> & </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classExiv2_1_1Internal_1_1PngChunk.html#9a05f1f7d1b88f8e869813f6b318fd35">TxtChunkType</a> </td> <td class="paramname"> <em>type</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Decode PNG tEXt, zTXt, or iTXt chunk data from <em>pImage</em> passed by data buffer <em>data</em> and extract Comment, Exif, Iptc, Xmp metadata accordingly. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pImage</em> </td><td>Pointer to the image to hold the metadata </td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>PNG Chunk data buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>PNG Chunk TXT type. </td></tr> </table> </dl> <p>References <a class="el" href="pngchunk_8cpp_source.html#l00110">keyTXTChunk()</a>, <a class="el" href="types_8hpp_source.html#l00258">Exiv2::DataBuf::pData_</a>, <a class="el" href="types_8hpp_source.html#l00260">Exiv2::DataBuf::size_</a>, and <a class="el" href="types_8hpp_source.html#l00122">Exiv2::string</a>.</p> <p>Referenced by <a class="el" href="pngimage_8cpp_source.html#l00098">Exiv2::PngImage::readMetadata()</a>.</p> </div> </div><p> <a class="anchor" name="03608e8b2950d894bc52c8c0bca3df77"></a><!-- doxytag: member="Exiv2::Internal::PngChunk::keyTXTChunk" ref="03608e8b2950d894bc52c8c0bca3df77" args="(const DataBuf &data, bool stripHeader=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> Exiv2::Internal::PngChunk::keyTXTChunk </td> <td>(</td> <td class="paramtype">const <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> & </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>stripHeader</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return PNG TXT chunk key as data buffer. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>PNG Chunk data buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>stripHeader</em> </td><td>Set true if chunk data start with header bytes, else false (default). </td></tr> </table> </dl> <p>References <a class="el" href="types_8hpp_source.html#l00258">Exiv2::DataBuf::pData_</a>, and <a class="el" href="types_8hpp_source.html#l00260">Exiv2::DataBuf::size_</a>.</p> <p>Referenced by <a class="el" href="pngchunk_8cpp_source.html#l00090">decodeTXTChunk()</a>.</p> </div> </div><p> <a class="anchor" name="f11fcb9508b26ea787bfb539fc69d350"></a><!-- doxytag: member="Exiv2::Internal::PngChunk::makeMetadataChunk" ref="f11fcb9508b26ea787bfb539fc69d350" args="(const std::string &metadata, MetadataId type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Exiv2::Internal::PngChunk::makeMetadataChunk </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>metadata</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceExiv2.html#cca494c8cf80f3ac8a804e1b54afffca">MetadataId</a> </td> <td class="paramname"> <em>type</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return a complete PNG chunk data compressed or not as buffer. Data returned is formated accordingly with metadata <em>type</em> to host passed by <em>metadata</em>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>metadata</em> </td><td>metadata buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>metadata type. </td></tr> </table> </dl> <p>References <a class="el" href="types_8hpp_source.html#l00122">Exiv2::string</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="pngchunk__int_8hpp.html">pngchunk_int.hpp</a><li>pngchunk.cpp</ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 25 15:18:13 2009 for Exiv2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>