HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IMG_FormatPassThru Class Reference

#include <IMG_FormatPassThru.h>

+ Inheritance diagram for IMG_FormatPassThru:

Public Member Functions

 IMG_FormatPassThru (const IMG_File *parent_file)
 
virtual ~IMG_FormatPassThru ()
 
virtual const char * getFormatName () const
 
virtual const char * getFormatLabel () const
 
virtual const char * getFormatDescription () const
 
virtual const char * getDefaultExtension () const
 
virtual const char * getFormatLocation () const
 Describes how the format was loaded (i.e. DSO or internal formats) More...
 
virtual int checkExtension (const char *filename) const
 
virtual int checkMagic (unsigned int magic) const
 
virtual int checkMagicSeekable (UT_IStream &is) const
 
virtual bool isPassThrough () const
 
virtual int checkDevice (const char *filename) const
 
virtual IMG_DataType getSupportedTypes () const
 Returns a bitfield of data types supported by this format. More...
 
virtual IMG_ColorModel getSupportedColorModels () const
 
virtual void getMaxResolution (unsigned &x, unsigned &y) const
 
virtual int isReadRandomAccess () const
 
virtual int isWriteRandomAccess () const
 
virtual int isTopFirst () const
 
virtual int isLeftFirst () const
 
virtual bool isDataWindowSupported () const
 does this format support a data window or sub-area. More...
 
virtual bool isDataWindowStreakSupported () const
 
virtual bool isDeepRasterSupported () const
 
virtual bool isDataInterleaved () const
 
virtual bool canPlaneTypesDiffer () const
 
virtual const IMG_FileOptionListgetOptions () const
 
virtual PXL_ColorSpace formatColorSpace () const
 
virtual fpreal formatColorSpaceGamma () const
 
virtual bool formatStoresColorSpace () const
 Return true if the image format can store the colorspace. More...
 
- Public Member Functions inherited from IMG_Format
 IMG_Format ()
 
 IMG_Format (bool addtolist)
 
virtual ~IMG_Format ()
 
IMG_FileallocValidFile () const
 
virtual IMG_ImageType getSupportedImageTypes () const
 
fpreal adjustGammaForFormat (PXL_ColorSpace src_color_space, fpreal src_color_space_gamma, bool src_data_is_8bit, bool *dest_data_is_8bit=NULL) const
 
virtual bool isReadable () const
 
virtual bool isWritable () const
 
virtual bool isDataWindowCropOnly () const
 
virtual IMG_DeepRasterColor getDeepRasterRGBASupport () const
 
virtual const IMG_FormatresolvePriority (const IMG_Format *format) const
 

Protected Member Functions

virtual IMG_FilecreateFile () const
 
virtual int isFormatOk (const IMG_Stat &) const
 
const IMG_FormatgetParent () const
 
- Protected Member Functions inherited from IMG_Format
void removeFormatFromList ()
 
const IMG_FileTagListgetGlobalTags ()
 

Protected Attributes

const IMG_FilemyParent
 

Additional Inherited Members

- Public Types inherited from IMG_Format
enum  AccessType { READ_ACCESS, WRITE_ACCESS }
 
- Static Public Member Functions inherited from IMG_Format
static const IMG_FormatfindFormatByName (const char *format_name)
 
static const IMG_FormatfindFormatByLabel (const char *format_label)
 
static const IMG_FormatfindFormatSeekable (UT_IStream &is)
 
static const IMG_FormatfindFormatNonSeekable (UT_IStream &is)
 
static const IMG_FormatgetStdoutFormat ()
 
static int getNFormats ()
 
static const IMG_FormatgetFormat (int idx)
 Access to the list of currently installed image formats. More...
 
static const IMG_FormatfindFormatReadable (const char *filename, const IMG_Stat *stat=0)
 
static const IMG_FormatfindFormatWritable (const char *filename, const IMG_Stat *stat=0)
 
static void setGlobalOption (const char *name, const char *value)
 Set an option globally for all formats. Use with extreme care. More...
 
static void getGlobalOption (const char *name, UT_String &value)
 Read the value of a global option. May return a NULL string. More...
 
static bool setFormatOptionDefault (const char *format_name, const char *format_option, const char *defvalue)
 
static bool getFormatOptionDefault (const char *format_name, const char *format_option, UT_String &defvalue)
 
static int matchExtension (const char *filename, const char *ext)
 Matches a filename against a single extension. More...
 
static int matchExtensions (const char *filename, const char *ext[])
 
- Static Protected Member Functions inherited from IMG_Format
static const IMG_FormatfindFormat (const char *filename, const IMG_Stat *stat, AccessType access)
 

Detailed Description

Definition at line 44 of file IMG_FormatPassThru.h.

Constructor & Destructor Documentation

IMG_FormatPassThru::IMG_FormatPassThru ( const IMG_File parent_file)
inline

Definition at line 50 of file IMG_FormatPassThru.h.

virtual IMG_FormatPassThru::~IMG_FormatPassThru ( )
inlinevirtual

Definition at line 55 of file IMG_FormatPassThru.h.

Member Function Documentation

virtual bool IMG_FormatPassThru::canPlaneTypesDiffer ( ) const
inlinevirtual

if true, planes can have different data formats & components. Otherwise, all planes must have the same data type and number of components.

Reimplemented from IMG_Format.

Definition at line 109 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::checkDevice ( const char *  ) const
inlinevirtual

The device method gives a higher priority to device checks. By default, this method returns 0 (no match). This is used to allow things like a60:3.pic (which uses the abekas device).

Reimplemented from IMG_Format.

Definition at line 77 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::checkExtension ( const char *  filename) const
inlinevirtual

Methods to determine if this is one of our recognized files. The extension is the first try. If there are multiple matches, then we resort to the magic number (when reading)

Implements IMG_Format.

Definition at line 68 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::checkMagic ( unsigned int  int) const
inlinevirtual

If possible, this magic numver checker will be called. This is used if the file is "seekable" (i.e. that we can rewind after checking)

Reimplemented from IMG_Format.

Definition at line 70 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::checkMagicSeekable ( UT_IStream is) const
inlinevirtual

If possible, this second magic number checker will be called. This is used if the file is "seekable" (i.e. that we can rewind after checking)

Reimplemented from IMG_Format.

Definition at line 72 of file IMG_FormatPassThru.h.

virtual IMG_File* IMG_FormatPassThru::createFile ( ) const
inlineprotectedvirtual

Implements IMG_Format.

Definition at line 124 of file IMG_FormatPassThru.h.

virtual PXL_ColorSpace IMG_FormatPassThru::formatColorSpace ( ) const
inlinevirtual

Some image formats have fixed color spaces, like JPEG (sRGB). The default is PXL_CS_UNKNOWN. For formats that can have colorspaces per plane, return PXL_CS_UNKNOWN and query the colorspace from IMG_Plane. formatColorSpaceGamma() is ignored unless the color space is PXL_CS_CUSTOM_GAMMA.

Reimplemented from IMG_Format.

Definition at line 115 of file IMG_FormatPassThru.h.

virtual fpreal IMG_FormatPassThru::formatColorSpaceGamma ( ) const
inlinevirtual

Specifies if this format can read an image file. One of isReadable() or isWritable() (or both) must return true.

Reimplemented from IMG_Format.

Definition at line 117 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::formatStoresColorSpace ( ) const
inlinevirtual

Return true if the image format can store the colorspace.

Reimplemented from IMG_Format.

Definition at line 119 of file IMG_FormatPassThru.h.

virtual const char* IMG_FormatPassThru::getDefaultExtension ( ) const
inlinevirtual

The default extension is used to determine whether the format should appear in the device/format menus. It should not contain the '.' (i.e. "tif" not ".tif")

Reimplemented from IMG_Format.

Definition at line 63 of file IMG_FormatPassThru.h.

virtual const char* IMG_FormatPassThru::getFormatDescription ( ) const
inlinevirtual

This can be optionally overridden to return a short description of the format. By default, no description is given.

Reimplemented from IMG_Format.

Definition at line 61 of file IMG_FormatPassThru.h.

virtual const char* IMG_FormatPassThru::getFormatLabel ( ) const
inlinevirtual

If getFormatLabel() is not overridden, the label will be the same as the name.

Reimplemented from IMG_Format.

Definition at line 59 of file IMG_FormatPassThru.h.

virtual const char* IMG_FormatPassThru::getFormatLocation ( ) const
inlinevirtual

Describes how the format was loaded (i.e. DSO or internal formats)

Reimplemented from IMG_Format.

Definition at line 65 of file IMG_FormatPassThru.h.

virtual const char* IMG_FormatPassThru::getFormatName ( ) const
inlinevirtual

All formats must have a unique name (like "JPEG").

Implements IMG_Format.

Definition at line 57 of file IMG_FormatPassThru.h.

virtual void IMG_FormatPassThru::getMaxResolution ( unsigned &  x,
unsigned &  y 
) const
inlinevirtual

Maximum allowable resolution for the file. If a user attempts to write an image larger than this, the image will be scaled to this resolution.

Implements IMG_Format.

Definition at line 84 of file IMG_FormatPassThru.h.

virtual const IMG_FileOptionList* IMG_FormatPassThru::getOptions ( ) const
inlinevirtual

Returns a list of options that can be set on the format when reading or writing (like 'compression' or 'comment').

Reimplemented from IMG_Format.

Definition at line 112 of file IMG_FormatPassThru.h.

const IMG_Format* IMG_FormatPassThru::getParent ( ) const
inlineprotected

Definition at line 129 of file IMG_FormatPassThru.h.

virtual IMG_ColorModel IMG_FormatPassThru::getSupportedColorModels ( ) const
inlinevirtual

Returns a bitfield of supported color models. If IMG_CM_REVERSED is set, this format stores data in BGR/ABGR format.

Implements IMG_Format.

Definition at line 82 of file IMG_FormatPassThru.h.

virtual IMG_DataType IMG_FormatPassThru::getSupportedTypes ( ) const
inlinevirtual

Returns a bitfield of data types supported by this format.

Implements IMG_Format.

Definition at line 80 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::isDataInterleaved ( ) const
inlinevirtual

Specifies whether this format stores its data interleaved (RGBRGBRGB) or non-interleaved (RRRGGGBBB). If your format supports both, pick one.

Reimplemented from IMG_Format.

Definition at line 106 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::isDataWindowStreakSupported ( ) const
inlinevirtual

does this format support saving whether the data outside the window is streaked from the window edges?

Reimplemented from IMG_Format.

Definition at line 100 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::isDataWindowSupported ( ) const
inlinevirtual

does this format support a data window or sub-area.

Reimplemented from IMG_Format.

Definition at line 98 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::isDeepRasterSupported ( ) const
inlinevirtual

does this format support deep rasters or multiple images? If not, only one plane of the color models that this format supports is allowed.

Reimplemented from IMG_Format.

Definition at line 103 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::isFormatOk ( const IMG_Stat ) const
inlineprotectedvirtual

Reimplemented from IMG_Format.

Definition at line 126 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::isLeftFirst ( ) const
inlinevirtual

horizontal data orientation. Where (0,0) lies in the image (top-left by default).

Reimplemented from IMG_Format.

Definition at line 95 of file IMG_FormatPassThru.h.

virtual bool IMG_FormatPassThru::isPassThrough ( ) const
inlinevirtual

Flags whether the format is a pass through format like Flip or Scale. Specific image formats (like JPEG) are never pass-through.

Reimplemented from IMG_Format.

Definition at line 75 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::isReadRandomAccess ( ) const
inlinevirtual

Some formats can be read and written in random order. Others require strict sequential order. If these methods return false, you should read and write scanlines in ascending order. When writing, they will be cached until they can be written sequentially.

Reimplemented from IMG_Format.

Definition at line 89 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::isTopFirst ( ) const
inlinevirtual

vertical data orientation. Where (0,0) lies in the image (top-left by default).

Reimplemented from IMG_Format.

Definition at line 93 of file IMG_FormatPassThru.h.

virtual int IMG_FormatPassThru::isWriteRandomAccess ( ) const
inlinevirtual

If 0 is returned, the scanlines must be written in sequential order or they will be cached until all scanlines can be written sequentially.

Reimplemented from IMG_Format.

Definition at line 91 of file IMG_FormatPassThru.h.

Member Data Documentation

const IMG_File* IMG_FormatPassThru::myParent
protected

Definition at line 132 of file IMG_FormatPassThru.h.


The documentation for this class was generated from the following file: