1999-12-15 22:38:02 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: imagjpeg.h
|
|
|
|
// 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_
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-12-15 22:38:02 +00:00
|
|
|
#pragma interface "imagjpeg.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/image.h"
|
|
|
|
|
2003-10-31 15:58:58 +00:00
|
|
|
// defines for wxImage::SetOption
|
|
|
|
#define wxIMAGE_OPTION_RESOLUTION wxString(_T("Resolution"))
|
|
|
|
#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(_T("ResolutionUnit"))
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
wxIMAGE_RESOLUTION_INCHES = 1,
|
|
|
|
wxIMAGE_RESOLUTION_CM = 2
|
|
|
|
};
|
|
|
|
|
1999-12-15 22:38:02 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxJPEGHandler
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if wxUSE_LIBJPEG
|
|
|
|
class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
|
|
|
|
{
|
|
|
|
public:
|
2002-12-04 14:11:26 +00:00
|
|
|
inline wxJPEGHandler()
|
|
|
|
{
|
|
|
|
m_name = wxT("JPEG file");
|
|
|
|
m_extension = wxT("jpg");
|
|
|
|
m_type = wxBITMAP_TYPE_JPEG;
|
|
|
|
m_mime = wxT("image/jpeg");
|
|
|
|
}
|
1999-12-15 22:38:02 +00:00
|
|
|
|
|
|
|
#if wxUSE_STREAMS
|
2002-12-04 14:11:26 +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 );
|
|
|
|
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
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_IMAGJPEG_H_
|
|
|
|
|