1999-12-15 17:38:02 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: imagjpeg.h
|
|
|
|
// Purpose: wxImage JPEG handler
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Vaclav Slavik
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-12-15 17:38:02 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_IMAGJPEG_H_
|
|
|
|
#define _WX_IMAGJPEG_H_
|
|
|
|
|
2005-03-16 11:18:31 -05:00
|
|
|
#include "wx/defs.h"
|
2003-10-31 10:58:58 -05:00
|
|
|
|
1999-12-15 17:38:02 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxJPEGHandler
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if wxUSE_LIBJPEG
|
2005-03-16 11:18:31 -05:00
|
|
|
|
|
|
|
#include "wx/image.h"
|
2010-11-24 19:53:44 -05:00
|
|
|
#include "wx/versioninfo.h"
|
2005-03-16 11:18:31 -05:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxJPEGHandler: public wxImageHandler
|
1999-12-15 17:38:02 -05:00
|
|
|
{
|
|
|
|
public:
|
2002-12-04 09:11:26 -05:00
|
|
|
inline wxJPEGHandler()
|
|
|
|
{
|
|
|
|
m_name = wxT("JPEG file");
|
|
|
|
m_extension = wxT("jpg");
|
2009-03-09 19:13:34 -04:00
|
|
|
m_altExtensions.Add(wxT("jpeg"));
|
|
|
|
m_altExtensions.Add(wxT("jpe"));
|
2002-12-04 09:11:26 -05:00
|
|
|
m_type = wxBITMAP_TYPE_JPEG;
|
|
|
|
m_mime = wxT("image/jpeg");
|
|
|
|
}
|
1999-12-15 17:38:02 -05:00
|
|
|
|
2010-11-24 19:53:44 -05:00
|
|
|
static wxVersionInfo GetLibraryVersionInfo();
|
|
|
|
|
1999-12-15 17:38:02 -05:00
|
|
|
#if wxUSE_STREAMS
|
2004-09-16 14:13:32 -04:00
|
|
|
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
|
|
|
|
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
|
2006-02-08 16:47:09 -05:00
|
|
|
protected:
|
2002-12-04 09:11:26 -05:00
|
|
|
virtual bool DoCanRead( wxInputStream& stream );
|
1999-12-15 17:38:02 -05:00
|
|
|
#endif
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxJPEGHandler)
|
1999-12-15 17:38:02 -05:00
|
|
|
};
|
2005-03-16 11:18:31 -05:00
|
|
|
|
|
|
|
#endif // wxUSE_LIBJPEG
|
1999-12-15 17:38:02 -05:00
|
|
|
|
2005-02-19 11:32:29 -05:00
|
|
|
#endif // _WX_IMAGJPEG_H_
|
1999-12-15 17:38:02 -05:00
|
|
|
|