Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/FreeImage.h view on Meta::CPAN
/** Color channels.
Constants used in color manipulation routines.
*/
FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
FICC_RGB = 0, //! Use red, green and blue channels
FICC_RED = 1, //! Use red channel
FICC_GREEN = 2, //! Use green channel
FICC_BLUE = 3, //! Use blue channel
FICC_ALPHA = 4, //! Use alpha channel
FICC_BLACK = 5, //! Use black channel
FICC_REAL = 6, //! Complex images: use real part
FICC_IMAG = 7, //! Complex images: use imaginary part
FICC_MAG = 8, //! Complex images: use magnitude
FICC_PHASE = 9 //! Complex images: use phase
};
// Metadata support ---------------------------------------------------------
/**
Tag data type information (based on TIFF specifications)
Note: RATIONALs are the ratio of two 32-bit integer values.
*/
FI_ENUM(FREE_IMAGE_MDTYPE) {
FIDT_NOTYPE = 0, //! placeholder
FIDT_BYTE = 1, //! 8-bit unsigned integer
FIDT_ASCII = 2, //! 8-bit bytes w/ last byte null
FIDT_SHORT = 3, //! 16-bit unsigned integer
FIDT_LONG = 4, //! 32-bit unsigned integer
FIDT_RATIONAL = 5, //! 64-bit unsigned fraction
FIDT_SBYTE = 6, //! 8-bit signed integer
FIDT_UNDEFINED = 7, //! 8-bit untyped data
FIDT_SSHORT = 8, //! 16-bit signed integer
FIDT_SLONG = 9, //! 32-bit signed integer
FIDT_SRATIONAL = 10, //! 64-bit signed fraction
FIDT_FLOAT = 11, //! 32-bit IEEE floating point
FIDT_DOUBLE = 12, //! 64-bit IEEE floating point
FIDT_IFD = 13, //! 32-bit unsigned integer (offset)
FIDT_PALETTE = 14, //! 32-bit RGBQUAD
FIDT_LONG8 = 16, //! 64-bit unsigned integer
FIDT_SLONG8 = 17, //! 64-bit signed integer
FIDT_IFD8 = 18 //! 64-bit unsigned integer (offset)
};
/**
Metadata models supported by FreeImage
*/
FI_ENUM(FREE_IMAGE_MDMODEL) {
FIMD_NODATA = -1,
FIMD_COMMENTS = 0, //! single comment or keywords
FIMD_EXIF_MAIN = 1, //! Exif-TIFF metadata
FIMD_EXIF_EXIF = 2, //! Exif-specific metadata
FIMD_EXIF_GPS = 3, //! Exif GPS metadata
FIMD_EXIF_MAKERNOTE = 4, //! Exif maker note metadata
FIMD_EXIF_INTEROP = 5, //! Exif interoperability metadata
FIMD_IPTC = 6, //! IPTC/NAA metadata
FIMD_XMP = 7, //! Abobe XMP metadata
FIMD_GEOTIFF = 8, //! GeoTIFF metadata
FIMD_ANIMATION = 9, //! Animation metadata
FIMD_CUSTOM = 10, //! Used to attach other metadata types to a dib
FIMD_EXIF_RAW = 11 //! Exif metadata as a raw buffer
};
/**
Handle to a metadata model
*/
FI_STRUCT (FIMETADATA) { void *data; };
/**
Handle to a FreeImage tag
*/
FI_STRUCT (FITAG) { void *data; };
// File IO routines ---------------------------------------------------------
#ifndef FREEIMAGE_IO
#define FREEIMAGE_IO
typedef void* fi_handle;
typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
#if (defined(_WIN32) || defined(__WIN32__))
#pragma pack(push, 1)
#else
#pragma pack(1)
#endif // WIN32
FI_STRUCT(FreeImageIO) {
FI_ReadProc read_proc; //! pointer to the function used to read data
FI_WriteProc write_proc; //! pointer to the function used to write data
FI_SeekProc seek_proc; //! pointer to the function used to seek
FI_TellProc tell_proc; //! pointer to the function used to aquire the current position
};
#if (defined(_WIN32) || defined(__WIN32__))
#pragma pack(pop)
#else
#pragma pack()
#endif // WIN32
/**
Handle to a memory I/O stream
*/
FI_STRUCT (FIMEMORY) { void *data; };
#endif // FREEIMAGE_IO
// Plugin routines ----------------------------------------------------------
#ifndef PLUGINS
#define PLUGINS
typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);
typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);
typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);
typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);
typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
( run in 1.052 second using v1.01-cache-2.11-cpan-4991d5b9bd9 )