]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/image.h
char handling fixed again
[wxWidgets.git] / include / wx / image.h
index 76a1fdc6e82a29a30caec15309174afd1a869942..1962bd3f87a31b0100608c8a72424871413efe5f 100644 (file)
 //-----------------------------------------------------------------------------
 
 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;
 
@@ -70,7 +73,7 @@ protected:
 // wxPNGHandler
 //-----------------------------------------------------------------------------
 
-#ifdef wxUSE_LIBPNG
+#if wxUSE_LIBPNG
 class WXDLLEXPORT wxPNGHandler: public wxImageHandler
 {
   DECLARE_DYNAMIC_CLASS(wxPNGHandler)
@@ -92,6 +95,29 @@ public:
 };
 #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
 //-----------------------------------------------------------------------------