1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
<HTML>
<head><title>wxImageHandler</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wximagehandler"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx115.htm#wximage"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx117.htm#wximagelist"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxImageHandler</H2>
<P>
This is the base class for implementing image file loading/saving, and image creation from data.
It is used within wxImage and is not normally seen by the application.<P>
If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler
and add the handler using <A HREF="wx115.htm#wximageaddhandler">wxImage::AddHandler</A> in your
application initialisation.<P>
<B><FONT COLOR="#FF0000">Note (Legal Issue)</FONT></B><P>
This software is based in part on the work of the Independent JPEG Group.<P>
(Applies when wxWindows is linked with JPEG support. wxJPEGHandler uses libjpeg
created by IJG.)<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/image.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx115.htm#wximage">wxImage</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wximagehandlerconstr">wxImageHandler::wxImageHandler</A><BR>
<A HREF="#topic458">wxImageHandler::~wxImageHandler</A><BR>
<A HREF="#topic459">wxImageHandler::GetName</A><BR>
<A HREF="#topic460">wxImageHandler::GetExtension</A><BR>
<A HREF="#topic461">wxImageHandler::GetType</A><BR>
<A HREF="#wximagehandlerloadfile">wxImageHandler::LoadFile</A><BR>
<A HREF="#wximagehandlersavefile">wxImageHandler::SaveFile</A><BR>
<A HREF="#topic462">wxImageHandler::SetName</A><BR>
<A HREF="#topic463">wxImageHandler::SetExtension</A><BR>
<A HREF="#topic464">wxImageHandler::SetType</A><BR>
<P>
<HR>
<A NAME="wximagehandlerconstr"></A>
<H3>wxImageHandler::wxImageHandler</H3>
<P>
<B></B> <B>wxImageHandler</B>()<P>
Default constructor. In your own default constructor, initialise the members
m_name, m_extension and m_type.<P>
<HR>
<A NAME="topic458"></A>
<H3>wxImageHandler::~wxImageHandler</H3>
<P>
<B></B> <B>~wxImageHandler</B>()<P>
Destroys the wxImageHandler object.<P>
<HR>
<A NAME="topic459"></A>
<H3>wxImageHandler::GetName</H3>
<P>
<B>wxString</B> <B>GetName</B>() <B>const</B><P>
Gets the name of this handler.<P>
<HR>
<A NAME="topic460"></A>
<H3>wxImageHandler::GetExtension</H3>
<P>
<B>wxString</B> <B>GetExtension</B>() <B>const</B><P>
Gets the file extension associated with this handler.<P>
<HR>
<A NAME="topic461"></A>
<H3>wxImageHandler::GetType</H3>
<P>
<B>long</B> <B>GetType</B>() <B>const</B><P>
Gets the image type associated with this handler.<P>
<HR>
<A NAME="wximagehandlerloadfile"></A>
<H3>wxImageHandler::LoadFile</H3>
<P>
<B>bool</B> <B>LoadFile</B>(<B>wxImage* </B><I>image</I>, <B>wxInputStream&</B><I> stream</I>)<P>
Loads a image from a stream, putting the resulting data into <I>image</I>.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>image</I><UL><UL>
The image object which is to be affected by this operation.</UL></UL>
<P>
<I>stream</I><UL><UL>
Opened input stream.
The meaning of <I>stream</I> is determined by the <I>type</I> parameter.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the operation succeeded, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx115.htm#wximageloadfile">wxImage::LoadFile</A><BR>
<A HREF="wx115.htm#wximagesavefile">wxImage::SaveFile</A><BR>
<A HREF="wx116.htm#wximagehandlersavefile">wxImageHandler::SaveFile</A><P>
<HR>
<A NAME="wximagehandlersavefile"></A>
<H3>wxImageHandler::SaveFile</H3>
<P>
<B>bool</B> <B>SaveFile</B>(<B>wxImage* </B><I>image</I>, <B>wxOutputStream& </B><I>stream</I>)<P>
Saves a image in the output stream.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>image</I><UL><UL>
The image object which is to be affected by this operation.</UL></UL>
<P>
<I>stream</I><UL><UL>
A stream. The meaning of <I>stream</I> is determined by the <I>type</I> parameter.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE if the operation succeeded, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx115.htm#wximageloadfile">wxImage::LoadFile</A><BR>
<A HREF="wx115.htm#wximagesavefile">wxImage::SaveFile</A><BR>
<A HREF="wx116.htm#wximagehandlerloadfile">wxImageHandler::LoadFile</A><P>
<HR>
<A NAME="topic462"></A>
<H3>wxImageHandler::SetName</H3>
<P>
<B>void</B> <B>SetName</B>(<B>const wxString& </B><I>name</I>)<P>
Sets the handler name.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>name</I><UL><UL>
Handler name.</UL></UL>
<P>
<HR>
<A NAME="topic463"></A>
<H3>wxImageHandler::SetExtension</H3>
<P>
<B>void</B> <B>SetExtension</B>(<B>const wxString& </B><I>extension</I>)<P>
Sets the handler extension.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>extension</I><UL><UL>
Handler extension.</UL></UL>
<P>
<HR>
<A NAME="topic464"></A>
<H3>wxImageHandler::SetType</H3>
<P>
<B>void</B> <B>SetType</B>(<B>long </B><I>type</I>)<P>
Sets the handler type.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>name</I><UL><UL>
Handler type.</UL></UL>
<P>
</BODY></HTML>
|