#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(_T("ResolutionUnit"))
// constants used with wxIMAGE_OPTION_RESOLUTIONUNIT
-enum
+//
+// NB: don't change these values, they correspond to libjpeg constants
+enum wxImageResolution
{
+ // Resolution not specified
+ wxIMAGE_RESOLUTION_NONE = 0,
+
+ // Resolution specified in inches
wxIMAGE_RESOLUTION_INCHES = 1,
+
+ // Resolution specified in centimeters
wxIMAGE_RESOLUTION_CM = 2
};
// classes
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxImageHandler;
-class WXDLLEXPORT wxImage;
-class WXDLLEXPORT wxPalette;
+class WXDLLIMPEXP_FWD_CORE wxImageHandler;
+class WXDLLIMPEXP_FWD_CORE wxImage;
+class WXDLLIMPEXP_FWD_CORE wxPalette;
//-----------------------------------------------------------------------------
// wxVariant support
#if wxUSE_VARIANT
#include "wx/variant.h"
-DECLARE_VARIANT_OBJECT_EXPORTED(wxImage,WXDLLEXPORT)
+DECLARE_VARIANT_OBJECT_EXPORTED(wxImage,WXDLLIMPEXP_CORE)
#endif
//-----------------------------------------------------------------------------
// wxImageHandler
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxImageHandler: public wxObject
+class WXDLLIMPEXP_CORE wxImageHandler: public wxObject
{
public:
wxImageHandler()
bool CallDoCanRead(wxInputStream& stream);
#endif // wxUSE_STREAMS
+ // helper for the derived classes SaveFile() implementations: returns the
+ // values of x- and y-resolution options specified as the image options if
+ // any
+ static wxImageResolution
+ GetResolutionFromOptions(const wxImage& image, int *x, int *y);
+
+
wxString m_name;
wxString m_extension;
wxString m_mime;
// wxImageHistogram
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxImageHistogramEntry
+class WXDLLIMPEXP_CORE wxImageHistogramEntry
{
public:
wxImageHistogramEntry() { index = value = 0; }
wxIntegerHash, wxIntegerEqual,
wxImageHistogramBase);
-class WXDLLEXPORT wxImageHistogram : public wxImageHistogramBase
+class WXDLLIMPEXP_CORE wxImageHistogram : public wxImageHistogramBase
{
public:
wxImageHistogram() : wxImageHistogramBase(256) { }
// wxImage
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxImage: public wxObject
+class WXDLLIMPEXP_CORE wxImage: public wxObject
{
public:
// red, green and blue are 8 bit unsigned integers in the range of 0..255
wxImage ResampleBicubic(int width, int height) const;
// blur the image according to the specified pixel radius
- wxImage Blur(int radius);
- wxImage BlurHorizontal(int radius);
- wxImage BlurVertical(int radius);
+ wxImage Blur(int radius) const;
+ wxImage BlurHorizontal(int radius) const;
+ wxImage BlurVertical(int radius) const;
wxImage ShrinkBy( int xFactor , int yFactor ) const ;
virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
private:
- friend class WXDLLEXPORT wxImageHandler;
+ friend class WXDLLIMPEXP_FWD_CORE wxImageHandler;
DECLARE_DYNAMIC_CLASS(wxImage)
};
-extern void WXDLLEXPORT wxInitAllImageHandlers();
+extern void WXDLLIMPEXP_CORE wxInitAllImageHandlers();
-extern WXDLLEXPORT_DATA(wxImage) wxNullImage;
+extern WXDLLIMPEXP_DATA_CORE(wxImage) wxNullImage;
//-----------------------------------------------------------------------------
// wxImage handlers