<HTML> <HEAD> <TITLE>class KImageIO</TITLE> <META NAME="Generator" CONTENT="KDOC "> </HEAD> <BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD> <TABLE BORDER="0"> <TR><TD valign="top" align="left" cellspacing="10"> <h1>class KImageIO</h1> </TD> <TD valign="top" align="right" colspan="1"> Interface to the KDE Image IO plugin architecture. <small><A HREF="#longdesc">More...</A></small></TD></TR> </TABLE> <HR> <TABLE BORDER="0"> <TR><TH>Definition</TH><TD><code>#include <<A HREF="kimageio_h.html">kimageio.h</A>></code></TD></TR> <TR><TH><A HREF="full-list-KImageIO.html">List of all Methods</A></TH></TR> </TABLE> </TD> <TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE> <h4>Public Types</h4><ul><LI>enum <A HREF="#ref1">Mode</A> { Reading, Writing } </LI> </ul><h4>Public Static Methods</h4><ul><LI>static void <b><A HREF="#ref2">registerFormats</A></b> () </LI> <LI>static bool <b><A HREF="#ref3">canWrite</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) </LI> <LI>static bool <b><A HREF="#ref4">canRead</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) </LI> <LI>static <A HREF="#QStringList">QStringList</A> <b><A HREF="#ref5">types</A></b> (Mode mode = Writing) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <b><A HREF="#ref6">pattern</A></b> (Mode mode = Reading) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <b><A HREF="#ref7">suffix</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <b><A HREF="#ref8">type</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& filename) </LI> <LI>static <A HREF="#QStringList">QStringList</A> <b><A HREF="#ref9">mimeTypes</A></b> ( Mode _mode = Writing ) </LI> <LI>static bool <b><A HREF="#ref10">isSupported</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& _mimeType, Mode _mode = Writing ) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <b><A HREF="#ref11">mimeType</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& _filename ) </LI> </ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> Interface to the KDE Image IO plugin architecture. </p> <p> This library allows KDE applications to read and write images in a variety of formats, transparently via the <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A> and <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A> load and save methods. </p> <p> The image processing backends are written as image handlers compatible with the <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimageio.html">QImageIO</A> handler format. The backends are loaded on demand when a particular format is requested. </p> <p></p> <H3>Formats </H3> <p> </p> <p> Currently supported formats include: </p> <ul> <li>JPEG <read> </li> <li>XV <read> <write> </li> <li>EPS <read> <write> </li> <li>NETPBM <incomplete> </li> <li>PNG <read> <write, only with newer libraries> </li> <li>TIFF <read> </li> <li>KRL <read> </li> </ul> <p> </p> <p></p> <H3>Usage </H3> <p> </p> <p> Simply call the <A HREF="KImageIO.html#registerFormats">KImageIO::registerFormats</A>() static method declared in kimgageio.h. </p> <p></p> <H3>Example </H3> <p> </p> <p></p><table border="0" width="100%"> <tr> <td bgcolor="#BEEAE0"> <pre> #include<qpixmap.h> #include<kimgio.h> int main( int argc, char **argv ) { .... <A HREF="KImageIO.html#registerFormats">KImageIO::registerFormats</A>(); ... // start main program } </pre> </td></tr> </table> <p> </p> <p></p> <p><b>See also</b>: <A HREF="KImageIO.html">KImageIO</A>, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A>, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimageio.html">QImageIO</A></p> <A NAME="Mode"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>Mode</strong> { Reading, Writing } </td><td align="right"><h3><strong>Mode</strong></h3></td></tr></table><p></p><p> Possible image file access modes. </p> <p> Used in various <A HREF="KImageIO.html">KImageIO</A> static function. </p> <A NAME="registerFormats"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>registerFormats</strong> () <br></td><td align="right"><h3><strong>registerFormats</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Registers all <A HREF="KImageIO.html">KImageIO</A> supported formats. </p> <A NAME="canWrite"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>canWrite</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) <br></td><td align="right"><h3><strong>canWrite</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Checks if a special type is supported for writing. </p> <A NAME="canRead"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>canRead</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) <br></td><td align="right"><h3><strong>canRead</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Checks if a special type is supported for reading. </p> <A NAME="types"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="#QStringList">QStringList</A> <strong>types</strong> (Mode mode = Writing) <br></td><td align="right"><h3><strong>types</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Retrieve a list of all <A HREF="KImageIO.html">KImageIO</A> supported formats. </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>mode</i></TD><TD align="left" valign="top">Tells whether to retrieve modes that can be read or written. </TD></TR> </TABLE></P> <A NAME="pattern"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <strong>pattern</strong> (Mode mode = Reading) <br></td><td align="right"><h3><strong>pattern</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Retrieve a list of patterns of all <A HREF="KImageIO.html">KImageIO</A> supported formats. </p> <p> These patterns can be passed to KFileDialog::getOpenFileName() or KFileDialog::getSaveFileName(), for example. </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>mode</i></TD><TD align="left" valign="top">Tells whether to retrieve modes that can be read or written. </TD></TR> </TABLE></P> <A NAME="suffix"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <strong>suffix</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& type) <br></td><td align="right"><h3><strong>suffix</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Retrieve the suffix of an image type. </p> <A NAME="type"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <strong>type</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& filename) <br></td><td align="right"><h3><strong>type</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Retrieve the type of given filename. </p> <A NAME="mimeTypes"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="#QStringList">QStringList</A> <strong>mimeTypes</strong> ( Mode _mode = Writing ) <br></td><td align="right"><h3><strong>mimeTypes</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Retrieve a list of MIME types for all <A HREF="KImageIO.html">KImageIO</A> supported formats. </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>mode</i></TD><TD align="left" valign="top">Tells whether to retrieve modes that can be read or written. </TD></TR> </TABLE></P> <A NAME="isSupported"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>isSupported</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& _mimeType, Mode _mode = Writing ) <br></td><td align="right"><h3><strong>isSupported</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Test to see whether a MIME type is supported to reading/writing. </p> <A NAME="mimeType"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <strong>mimeType</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>& _filename ) <br></td><td align="right"><h3><strong>mimeType</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Return the MIME type of <code>_filename</code>. </p> <HR><UL><LI><i>Version</i>: $Id: kimageio.h,v 1.3 2000/06/06 22:53:36 gehrmab Exp $ </LI><LI><i>Author</i>: Sirtaj Singh Kang </LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:09:14 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>