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
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_IMAGJPEG_H_
|
|
|
|
#define _WX_IMAGJPEG_H_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-12-15 17:38:02 -05:00
|
|
|
#pragma interface "imagjpeg.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/image.h"
|
|
|
|
|
2003-10-31 10:58:58 -05: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 17:38:02 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxJPEGHandler
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if wxUSE_LIBJPEG
|
|
|
|
class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
|
|
|
|
{
|
|
|
|
public:
|
2002-12-04 09:11:26 -05: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 17:38:02 -05:00
|
|
|
|
|
|
|
#if wxUSE_STREAMS
|
2002-12-04 09:11:26 -05: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 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
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_IMAGJPEG_H_
|
|
|
|
|