Version: 3.3.0

#include <wx/imagtiff.h>

+ Inheritance diagram for wxTIFFHandler:

Detailed Description

This is the image handler for the TIFF format.

Library:  wxCore
Category:  Graphics Device Interface (GDI)
See also
wxImage, wxImageHandler, wxInitAllImageHandlers()

Public Member Functions

 wxTIFFHandler ()
 Default constructor for wxTIFFHandler. More...
 
virtual bool LoadFile (wxImage *image, wxInputStream &stream, bool verbose=true, int index=-1)
 Loads an image from a stream, putting the resulting data into image. More...
 
- Public Member Functions inherited from wxImageHandler
 wxImageHandler ()
 Default constructor. More...
 
virtual ~wxImageHandler ()
 Destroys the wxImageHandler object. More...
 
bool CanRead (wxInputStream &stream)
 Returns true if this handler supports the image format contained in the given stream. More...
 
bool CanRead (const wxString &filename)
 Returns true if this handler supports the image format contained in the file with the given name. More...
 
const wxStringGetExtension () const
 Gets the preferred file extension associated with this handler. More...
 
const wxArrayStringGetAltExtensions () const
 Returns the other file extensions associated with this handler. More...
 
int GetImageCount (wxInputStream &stream)
 If the image file contains more than one image and the image handler is capable of retrieving these individually, this function will return the number of available images. More...
 
const wxStringGetMimeType () const
 Gets the MIME type associated with this handler. More...
 
const wxStringGetName () const
 Gets the name of this handler. More...
 
wxBitmapType GetType () const
 Gets the image type associated with this handler. More...
 
void SetExtension (const wxString &extension)
 Sets the preferred file extension associated with this handler. More...
 
void SetAltExtensions (const wxArrayString &extensions)
 Sets the alternative file extensions associated with this handler. More...
 
void SetMimeType (const wxString &mimetype)
 Sets the handler MIME type. More...
 
void SetName (const wxString &name)
 Sets the handler name. More...
 
void SetType (wxBitmapType type)
 Sets the bitmap type for the handler. More...
 
- Public Member Functions inherited from wxObject
 wxObject ()
 Default ctor; initializes to nullptr the internal reference data. More...
 
 wxObject (const wxObject &other)
 Copy ctor. More...
 
virtual ~wxObject ()
 Destructor. More...
 
virtual wxClassInfoGetClassInfo () const
 This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
 
wxObjectRefDataGetRefData () const
 Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
 
bool IsKindOf (const wxClassInfo *info) const
 Determines whether this class is a subclass of (or the same class as) the given class. More...
 
bool IsSameAs (const wxObject &obj) const
 Returns true if this object has the same data pointer as obj. More...
 
void Ref (const wxObject &clone)
 Makes this object refer to the data in clone. More...
 
void SetRefData (wxObjectRefData *data)
 Sets the wxObject::m_refData pointer. More...
 
void UnRef ()
 Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
 
void UnShare ()
 This is the same of AllocExclusive() but this method is public. More...
 
void operator delete (void *buf)
 The delete operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. More...
 
void * operator new (size_t size, const wxString &filename=nullptr, int lineNum=0)
 The new operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. More...
 

Static Public Member Functions

static wxVersionInfo GetLibraryVersionInfo ()
 Retrieve the version information about the TIFF library used by this handler. More...
 
- Static Public Member Functions inherited from wxImageHandler
static wxVersionInfo GetLibraryVersionInfo ()
 Retrieve the version information about the image library used by this handler. More...
 

Protected Member Functions

virtual bool SaveFile (wxImage *image, wxOutputStream &stream, bool verbose=true)
 Saves an image in the output stream. More...
 
virtual int DoGetImageCount (wxInputStream &stream)
 Called to get the number of images available in a multi-image file type, if supported. More...
 
virtual bool DoCanRead (wxInputStream &stream)
 Called to test if this handler can read an image from the given stream. More...
 
- Protected Member Functions inherited from wxObject
void AllocExclusive ()
 Ensure that this object's data is not shared with any other object. More...
 
virtual wxObjectRefDataCreateRefData () const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
 
virtual wxObjectRefDataCloneRefData (const wxObjectRefData *data) const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...
 

Additional Inherited Members

- Protected Attributes inherited from wxObject
wxObjectRefDatam_refData
 Pointer to an object which is the object's reference-counted data. More...
 

Constructor & Destructor Documentation

◆ wxTIFFHandler()

wxTIFFHandler::wxTIFFHandler ( )

Default constructor for wxTIFFHandler.

Member Function Documentation

◆ DoCanRead()

virtual bool wxTIFFHandler::DoCanRead ( wxInputStream stream)
protectedvirtual

Called to test if this handler can read an image from the given stream.

NOTE: this function is allowed to change the current stream position since CallDoCanRead() will take care of restoring it later

Implements wxImageHandler.

◆ DoGetImageCount()

virtual int wxTIFFHandler::DoGetImageCount ( wxInputStream stream)
protectedvirtual

Called to get the number of images available in a multi-image file type, if supported.

NOTE: this function is allowed to change the current stream position since GetImageCount() will take care of restoring it later

Reimplemented from wxImageHandler.

◆ GetLibraryVersionInfo()

static wxVersionInfo wxTIFFHandler::GetLibraryVersionInfo ( )
static

Retrieve the version information about the TIFF library used by this handler.

Since
2.9.2

◆ LoadFile()

virtual bool wxTIFFHandler::LoadFile ( wxImage image,
wxInputStream stream,
bool  verbose = true,
int  index = -1 
)
virtual

Loads an image from a stream, putting the resulting data into image.

If the image file contains more than one image and the image handler is capable of retrieving these individually, index indicates which image to read from the stream.

Parameters
imageThe image object which is to be affected by this operation.
streamOpened input stream for reading image data.
verboseIf set to true, errors reported by the image handler will produce wxLogMessages.
indexThe index of the image in the file (starting from zero).
Returns
true if the operation succeeded, false otherwise.
See also
wxImage::LoadFile, wxImage::SaveFile, SaveFile()

Reimplemented from wxImageHandler.

◆ SaveFile()

virtual bool wxTIFFHandler::SaveFile ( wxImage image,
wxOutputStream stream,
bool  verbose = true 
)
protectedvirtual

Saves an image in the output stream.

Parameters
imageThe image object which is to be affected by this operation.
streamOpened output stream for writing the data.
verboseIf set to true, errors reported by the image handler will produce wxLogMessages.
Returns
true if the operation succeeded, false otherwise.
See also
wxImage::LoadFile, wxImage::SaveFile, LoadFile()

Reimplemented from wxImageHandler.