HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HDK_Sample::IMG_SampleFormat Class Reference
+ Inheritance diagram for HDK_Sample::IMG_SampleFormat:

Public Member Functions

 IMG_SampleFormat ()
 
virtual ~IMG_SampleFormat ()
 
virtual const char * getFormatName () const
 
virtual const char * getFormatLabel () const
 
virtual const char * getFormatDescription () const
 
virtual const char * getDefaultExtension () const
 
virtual IMG_FilecreateFile () const
 
virtual int checkExtension (const char *filename) const
 
virtual int checkMagic (unsigned int) 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
 
- Public Member Functions inherited from IMG_Format
 IMG_Format ()
 
 IMG_Format (bool addtolist)
 
virtual ~IMG_Format ()
 
IMG_FileallocValidFile () const
 
virtual bool isPassThrough () const
 
virtual const char * getFormatLocation () const
 Describes how the format was loaded (i.e. DSO or internal formats) More...
 
virtual int checkDevice (const char *) const
 
virtual IMG_ImageType getSupportedImageTypes () const
 
virtual int isTopFirst () const
 
virtual int isLeftFirst () const
 
virtual bool formatStoresColorSpace () const
 Return true if the image format can store the colorspace. More...
 
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 int checkMagicSeekable (UT_IStream &is) const
 
virtual bool isReadable () const
 
virtual bool isWritable () const
 
virtual bool isDataWindowSupported () const
 does this format support a data window or sub-area. More...
 
virtual bool isDataWindowCropOnly () const
 
virtual bool isDataWindowStreakSupported () const
 
virtual bool isDeepRasterSupported () const
 
virtual IMG_DeepRasterColor getDeepRasterRGBASupport () const
 
virtual bool isDataInterleaved () const
 
virtual bool canPlaneTypesDiffer () const
 
virtual const IMG_FileOptionListgetOptions () const
 
virtual const IMG_FormatresolvePriority (const IMG_Format *format) const
 
virtual PXL_ColorSpace formatColorSpace () const
 
virtual fpreal formatColorSpaceGamma () const
 

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[])
 
- Protected Member Functions inherited from IMG_Format
virtual int isFormatOk (const IMG_Stat &stat) const
 
void removeFormatFromList ()
 
const IMG_FileTagListgetGlobalTags ()
 
- Static Protected Member Functions inherited from IMG_Format
static const IMG_FormatfindFormat (const char *filename, const IMG_Stat *stat, AccessType access)
 

Detailed Description

Custom image file format definition. This class defines the properties of the custom image format.

See Also
IMG_Sample
Examples:
IMG/IMG_Sample.C.

Definition at line 55 of file IMG_Sample.C.

Constructor & Destructor Documentation

HDK_Sample::IMG_SampleFormat::IMG_SampleFormat ( )
inline
Examples:
IMG/IMG_Sample.C.

Definition at line 57 of file IMG_Sample.C.

virtual HDK_Sample::IMG_SampleFormat::~IMG_SampleFormat ( )
inlinevirtual
Examples:
IMG/IMG_Sample.C.

Definition at line 58 of file IMG_Sample.C.

Member Function Documentation

int IMG_SampleFormat::checkExtension ( const char *  filename) const
virtual

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.

Examples:
IMG/IMG_Sample.C.

Definition at line 125 of file IMG_Sample.C.

int IMG_SampleFormat::checkMagic ( unsigned  int) const
virtual

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.

Examples:
IMG/IMG_Sample.C.

Definition at line 132 of file IMG_Sample.C.

IMG_File * IMG_SampleFormat::createFile ( ) const
virtual

Implements IMG_Format.

Examples:
IMG/IMG_Sample.C.

Definition at line 119 of file IMG_Sample.C.

const char * IMG_SampleFormat::getDefaultExtension ( ) const
virtual

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.

Examples:
IMG/IMG_Sample.C.

Definition at line 110 of file IMG_Sample.C.

const char * IMG_SampleFormat::getFormatDescription ( ) const
virtual

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

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Sample.C.

Definition at line 102 of file IMG_Sample.C.

const char * IMG_SampleFormat::getFormatLabel ( ) const
virtual

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

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Sample.C.

Definition at line 95 of file IMG_Sample.C.

const char * IMG_SampleFormat::getFormatName ( ) const
virtual

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

Implements IMG_Format.

Examples:
IMG/IMG_Sample.C.

Definition at line 88 of file IMG_Sample.C.

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

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.

Examples:
IMG/IMG_Sample.C.

Definition at line 139 of file IMG_Sample.C.

virtual IMG_ColorModel HDK_Sample::IMG_SampleFormat::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.

Examples:
IMG/IMG_Sample.C.

Definition at line 73 of file IMG_Sample.C.

virtual IMG_DataType HDK_Sample::IMG_SampleFormat::getSupportedTypes ( ) const
inlinevirtual

Returns a bitfield of data types supported by this format.

Implements IMG_Format.

Examples:
IMG/IMG_Sample.C.

Definition at line 71 of file IMG_Sample.C.

virtual int HDK_Sample::IMG_SampleFormat::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.

Examples:
IMG/IMG_Sample.C.

Definition at line 80 of file IMG_Sample.C.

virtual int HDK_Sample::IMG_SampleFormat::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.

Examples:
IMG/IMG_Sample.C.

Definition at line 81 of file IMG_Sample.C.


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