imagtiff.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/imagtiff.h
  3. // Purpose: wxImage TIFF handler
  4. // Author: Robert Roebling
  5. // Copyright: (c) Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_IMAGTIFF_H_
  9. #define _WX_IMAGTIFF_H_
  10. #include "wx/defs.h"
  11. //-----------------------------------------------------------------------------
  12. // wxTIFFHandler
  13. //-----------------------------------------------------------------------------
  14. #if wxUSE_LIBTIFF
  15. #include "wx/image.h"
  16. #include "wx/versioninfo.h"
  17. // defines for wxImage::SetOption
  18. #define wxIMAGE_OPTION_TIFF_BITSPERSAMPLE wxString(wxT("BitsPerSample"))
  19. #define wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL wxString(wxT("SamplesPerPixel"))
  20. #define wxIMAGE_OPTION_TIFF_COMPRESSION wxString(wxT("Compression"))
  21. #define wxIMAGE_OPTION_TIFF_PHOTOMETRIC wxString(wxT("Photometric"))
  22. #define wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR wxString(wxT("ImageDescriptor"))
  23. // for backwards compatibility
  24. #define wxIMAGE_OPTION_BITSPERSAMPLE wxIMAGE_OPTION_TIFF_BITSPERSAMPLE
  25. #define wxIMAGE_OPTION_SAMPLESPERPIXEL wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL
  26. #define wxIMAGE_OPTION_COMPRESSION wxIMAGE_OPTION_TIFF_COMPRESSION
  27. #define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR
  28. class WXDLLIMPEXP_CORE wxTIFFHandler: public wxImageHandler
  29. {
  30. public:
  31. wxTIFFHandler();
  32. static wxVersionInfo GetLibraryVersionInfo();
  33. #if wxUSE_STREAMS
  34. virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
  35. virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
  36. protected:
  37. virtual int DoGetImageCount( wxInputStream& stream );
  38. virtual bool DoCanRead( wxInputStream& stream );
  39. #endif
  40. private:
  41. DECLARE_DYNAMIC_CLASS(wxTIFFHandler)
  42. };
  43. #endif // wxUSE_LIBTIFF
  44. #endif // _WX_IMAGTIFF_H_