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