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.
If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler and add the handler using wxImage::AddHandler in your application initialisation.
Note (Legal Issue)
This software is based in part on the work of the Independent JPEG Group.
(Applies when wxWindows is linked with JPEG support. wxJPEGHandler uses libjpeg created by IJG.)
Derived from
Include files
<wx/image.h>
See also
Members
wxImageHandler::wxImageHandler
wxImageHandler::~wxImageHandler
wxImageHandler::GetName
wxImageHandler::GetExtension
wxImageHandler::GetType
wxImageHandler::LoadFile
wxImageHandler::SaveFile
wxImageHandler::SetName
wxImageHandler::SetExtension
wxImageHandler::SetType
wxImageHandler()
Default constructor. In your own default constructor, initialise the members m_name, m_extension and m_type.
~wxImageHandler()
Destroys the wxImageHandler object.
wxString GetName() const
Gets the name of this handler.
wxString GetExtension() const
Gets the file extension associated with this handler.
long GetType() const
Gets the image type associated with this handler.
bool LoadFile(wxImage* image, wxInputStream& stream)
Loads a image from a stream, putting the resulting data into image.
Parameters
image
stream
Return value
TRUE if the operation succeeded, FALSE otherwise.
See also
wxImage::LoadFile
wxImage::SaveFile
wxImageHandler::SaveFile
bool SaveFile(wxImage* image, wxOutputStream& stream)
Saves a image in the output stream.
Parameters
image
stream
Return value
TRUE if the operation succeeded, FALSE otherwise.
See also
wxImage::LoadFile
wxImage::SaveFile
wxImageHandler::LoadFile
void SetName(const wxString& name)
Sets the handler name.
Parameters
name
void SetExtension(const wxString& extension)
Sets the handler extension.
Parameters
extension
void SetType(long type)
Sets the handler type.
Parameters
name