#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
-
+
virtual int GetImageCount( wxInputStream& stream );
bool CanRead( wxInputStream& stream ) { return DoCanRead(stream); }
bool CanRead( const wxString& name );
-#endif
+#endif // wxUSE_STREAMS
void SetName(const wxString& name) { m_name = name; }
void SetExtension(const wxString& ext) { m_extension = ext; }
wxString GetMimeType() const { return m_mime; }
protected:
+#if wxUSE_STREAMS
virtual bool DoCanRead( wxInputStream& stream ) = 0;
+#endif // wxUSE_STREAMS
wxString m_name;
wxString m_extension;
wxString m_mime;
long m_type;
-
};
-
//-----------------------------------------------------------------------------
// wxImage
//-----------------------------------------------------------------------------
wxImage Scale( int width, int height ) const;
// rescales the image in place
- void Rescale( int width, int height ) { *this = Scale(width, height); }
+ wxImage& Rescale( int width, int height ) { return *this = Scale(width, height); }
// these routines are slow but safe
void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b );