HDK
|
Public Member Functions | |
IMG_SampleFormat () | |
~IMG_SampleFormat () override | |
const char * | getFormatName () const override |
const char * | getFormatLabel () const override |
const char * | getFormatDescription () const override |
const char * | getDefaultExtension () const override |
IMG_File * | createFile () const override |
int | checkExtension (const char *filename) const override |
int | checkMagic (unsigned int) const override |
IMG_DataType | getSupportedTypes () const override |
Returns a bitfield of data types supported by this format. More... | |
IMG_ColorModel | getSupportedColorModels () const override |
void | getMaxResolution (unsigned &x, unsigned &y) const override |
int | isReadRandomAccess () const override |
int | isWriteRandomAccess () const override |
![]() | |
IMG_Format () | |
IMG_Format (bool addtolist) | |
virtual | ~IMG_Format () |
IMG_File * | allocValidFile () 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 const IMG_Format * | resolvePriority (const IMG_Format *format) const |
virtual bool | formatStoresColorSpace () const |
Return true if the image format can store the colorspace. More... | |
virtual const char * | getMetadataKey () const |
virtual int | checkMagicSeekable (UT_IStream &is) const |
virtual PXL_ColorSpace | formatColorSpace () const |
virtual fpreal | formatColorSpaceGamma () 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 |
fpreal | adjustGammaForFormat (PXL_ColorSpace *src_color_space, fpreal src_color_space_gamma, bool src_data_is_8bit, bool *dest_data_is_8bit) 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_FileOptionList * | getOptions () const |
virtual const IMG_MetadataOptions & | formatMetadata () const |
Returns list of well known metadata for the format. More... | |
Additional Inherited Members | |
![]() | |
enum | AccessType { READ_ACCESS, WRITE_ACCESS } |
![]() | |
static const IMG_Format * | findFormatByName (const char *format_name) |
static const IMG_Format * | findFormatByLabel (const char *format_label) |
static const IMG_Format * | findFormatSeekable (UT_IStream &is) |
static const IMG_Format * | findFormatNonSeekable (UT_IStream &is) |
static const IMG_Format * | findFormatByExtension (const char *filename) |
static const IMG_Format * | getStdoutFormat () |
static const IMG_Format * | metadataPrefix (const char *key) |
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 int | getNFormats () |
static const IMG_Format * | getFormat (int idx) |
Access to the list of currently installed image formats. More... | |
static const IMG_Format * | findFormatReadable (const char *filename, const IMG_Stat *stat=0) |
static const IMG_Format * | findFormatWritable (const char *filename, const IMG_Stat *stat=0) |
static void | findFormatReadable (UT_Array< const IMG_Format * > &formats, const char *filename, const IMG_Stat *stat=nullptr, const UT_Array< const IMG_Format * > *image_formats=nullptr) |
static void | findFormatWritable (UT_Array< const IMG_Format * > &formats, const char *filename, const IMG_Stat *stat=nullptr, const UT_Array< const IMG_Format * > *image_formats=nullptr) |
static UT_StringHolder | artistDefault () |
static UT_StringHolder | hostnameDefault () |
![]() | |
virtual int | isFormatOk (const IMG_Stat &stat) const |
void | removeFormatFromList () |
const IMG_Metadata * | getGlobalTags () |
![]() | |
static const IMG_Format * | findFormat (const char *filename, const IMG_Stat *stat, AccessType access) |
static void | findFormat (UT_Array< const IMG_Format * > &list, const char *filename, const IMG_Stat *stat, AccessType access, const UT_Array< const IMG_Format * > *image_formats=nullptr) |
Custom image file format definition. This class defines the properties of the custom image format.
Definition at line 55 of file IMG_Sample.C.
|
inline |
Definition at line 57 of file IMG_Sample.C.
|
inlineoverride |
Definition at line 58 of file IMG_Sample.C.
|
overridevirtual |
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 125 of file IMG_Sample.C.
|
overridevirtual |
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 132 of file IMG_Sample.C.
|
overridevirtual |
|
overridevirtual |
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 110 of file IMG_Sample.C.
|
overridevirtual |
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 102 of file IMG_Sample.C.
|
overridevirtual |
If getFormatLabel() is not overridden, the label will be the same as the name.
Reimplemented from IMG_Format.
Definition at line 95 of file IMG_Sample.C.
|
overridevirtual |
All formats must have a unique name (like "JPEG").
Implements IMG_Format.
Definition at line 88 of file IMG_Sample.C.
|
overridevirtual |
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 139 of file IMG_Sample.C.
|
inlineoverridevirtual |
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 73 of file IMG_Sample.C.
|
inlineoverridevirtual |
Returns a bitfield of data types supported by this format.
Implements IMG_Format.
Definition at line 71 of file IMG_Sample.C.
|
inlineoverridevirtual |
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 80 of file IMG_Sample.C.
|
inlineoverridevirtual |
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 81 of file IMG_Sample.C.