Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/FreeImage/PSDParser.h view on Meta::CPAN
~psdImageResource();
void Reset();
};
/**
Table A-6: ResolutionInfo structure
This structure contains information about the resolution of an image. It is
written as an image resource. See the Document file formats chapter for more
details.
*/
class psdResolutionInfo {
public:
short _widthUnit; //! Display width as 1=inches; 2=cm; 3=points; 4=picas; 5=columns.
short _heightUnit; //! Display height as 1=inches; 2=cm; 3=points; 4=picas; 5=columns.
short _hRes; //! Horizontal resolution in pixels per inch.
short _vRes; //! Vertical resolution in pixels per inch.
int _hResUnit; //! 1=display horizontal resolution in pixels per inch; 2=display horizontal resolution in pixels per cm.
int _vResUnit; //! 1=display vertical resolution in pixels per inch; 2=display vertical resolution in pixels per cm.
public:
psdResolutionInfo();
~psdResolutionInfo();
/**
@return Returns the number of bytes read
*/
int Read(FreeImageIO *io, fi_handle handle);
/**
@param res_x [out] X resolution in pixels/meter
@param res_y [out] Y resolution in pixels/meter
*/
void GetResolutionInfo(unsigned &res_x, unsigned &res_y);
};
// Obsolete - Photoshop 2.0
class psdResolutionInfo_v2 {
public:
short _Channels;
short _Rows;
short _Columns;
short _Depth;
short _Mode;
public:
psdResolutionInfo_v2();
~psdResolutionInfo_v2();
/**
@return Returns the number of bytes read
*/
int Read(FreeImageIO *io, fi_handle handle);
};
/**
Table A-7: DisplayInfo Color spaces
This structure contains display information about each channel. It is written as an image resource.
*/
class psdDisplayInfo {
public:
short _ColourSpace;
short _Colour[4];
short _Opacity; //! 0..100
BYTE _Kind; //! selected = 0, protected = 1
BYTE _padding; //! should be zero
public:
psdDisplayInfo();
~psdDisplayInfo();
/**
@return Returns the number of bytes read
*/
int Read(FreeImageIO *io, fi_handle handle);
};
/**
Table 2-5: Thumbnail resource header
Adobe Photoshop 5.0 and later stores thumbnail information for preview
display in an image resource block. These resource blocks consist of an initial
28 byte header, followed by a JFIF thumbnail in RGB (red, green, blue) order
for both Macintosh and Windows. Adobe Photoshop 4.0 stored the
thumbnail information in the same format except the data section is BGR
(blue, green, red). The Adobe Photoshop 4.0 format is at resource ID 1033
and the Adobe Photoshop 5.0 format is at resource ID 1036.
*/
class psdThumbnail {
public:
int _Format; //! = 1 (kJpegRGB). Also supports kRawRGB (0).
int _Width; //! Width of thumbnail in pixels.
int _Height; //! Height of thumbnail in pixels.
int _WidthBytes; //! Padded row bytes as (width * bitspixel + 31) / 32 * 4.
int _Size; //! Total size as widthbytes * height * planes
int _CompressedSize; //! Size after compression. Used for consistentcy check.
short _BitPerPixel; //! = 24. Bits per pixel.
short _Planes; //! = 1. Number of planes.
FIBITMAP * _dib; //! JFIF data as uncompressed dib. Note: For resource ID 1033 the data is in BGR format.
public:
psdThumbnail();
~psdThumbnail();
FIBITMAP* getDib() { return _dib; }
/**
@return Returns the number of bytes read
*/
int Read(FreeImageIO *io, fi_handle handle, int iResourceSize, bool isBGR);
private:
psdThumbnail(const psdThumbnail&);
psdThumbnail& operator=(const psdThumbnail&);
};
class psdICCProfile {
public:
int _ProfileSize;
BYTE * _ProfileData;
public:
psdICCProfile();
~psdICCProfile();
void clear();
/**
@return Returns the number of bytes read
*/
int Read(FreeImageIO *io, fi_handle handle, int size);
};
( run in 0.940 second using v1.01-cache-2.11-cpan-d7f47b0818f )