class WXDLLEXPORT wxBMPHandler;
class WXDLLEXPORT wxImage;
+class WXDLLEXPORT wxBitmap;
+
//-----------------------------------------------------------------------------
// wxImageHandler
//-----------------------------------------------------------------------------
public:
- inline wxPNGHandler()
- {
- m_name = "PNG file";
- m_extension = "png";
- m_type = wxBITMAP_TYPE_PNG;
- };
+ inline wxPNGHandler()
+ {
+ m_name = "PNG file";
+ m_extension = "png";
+ m_type = wxBITMAP_TYPE_PNG;
+ };
- virtual bool LoadFile( wxImage *image, const wxString& name );
- virtual bool SaveFile( wxImage *image, const wxString& name );
+ virtual bool LoadFile( wxImage *image, const wxString& name );
+ virtual bool SaveFile( wxImage *image, const wxString& name );
};
//-----------------------------------------------------------------------------
public:
- inline wxBMPHandler()
- {
- m_name = "BMP file";
- m_extension = "bmp";
- m_type = wxBITMAP_TYPE_BMP;
- };
+ inline wxBMPHandler()
+ {
+ m_name = "BMP file";
+ m_extension = "bmp";
+ m_type = wxBITMAP_TYPE_BMP;
+ };
- virtual bool LoadFile( wxImage *image, const wxString& name );
+ virtual bool LoadFile( wxImage *image, const wxString& name );
};
+
//-----------------------------------------------------------------------------
// wxImage
//-----------------------------------------------------------------------------
wxImage( const wxImage& image );
wxImage( const wxImage* image );
+
+ // these functions get implemented in /src/(platform)/bitmap.cpp
+ wxImage( const wxBitmap &bitmap );
+ wxBitmap ConvertToBitmap() const;
void Create( int width, int height );
void Destroy();
+ wxImage Scale( int width, int height );
+
+ // these routines are slow but safe
+ void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b );
+ unsigned char GetRed( int x, int y );
+ unsigned char GetGreen( int x, int y );
+ unsigned char GetBlue( int x, int y );
+
virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_PNG );
virtual bool SaveFile( const wxString& name, int type );
static wxImageHandler *FindHandler( long imageType );
static void CleanUpHandlers();
+ static void InitStandardHandlers();
protected: