//-----------------------------------------------------------------------------
class WXDLLEXPORT wxImageHandler;
-#ifdef wxUSE_LIBPNG
+#if wxUSE_LIBPNG
class WXDLLEXPORT wxPNGHandler;
#endif
+#if wxUSE_LIBJPEG
+class WXDLLEXPORT wxJPEGHandler;
+#endif
class WXDLLEXPORT wxBMPHandler;
class WXDLLEXPORT wxImage;
// wxPNGHandler
//-----------------------------------------------------------------------------
-#ifdef wxUSE_LIBPNG
+#if wxUSE_LIBPNG
class WXDLLEXPORT wxPNGHandler: public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPNGHandler)
};
#endif
+//-----------------------------------------------------------------------------
+// wxJPEGHandler
+//-----------------------------------------------------------------------------
+
+#if wxUSE_LIBJPEG
+class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
+{
+ DECLARE_DYNAMIC_CLASS(wxJPEGHandler)
+
+public:
+
+ inline wxJPEGHandler()
+ {
+ m_name = "JPEG file";
+ m_extension = "jpg";
+ m_type = wxBITMAP_TYPE_JPEG;
+ };
+
+ virtual bool LoadFile( wxImage *image, wxInputStream& stream );
+ virtual bool SaveFile( wxImage *image, wxOutputStream& stream );
+};
+#endif
+
//-----------------------------------------------------------------------------
// wxBMPHandler
//-----------------------------------------------------------------------------