 |
libpgf
7.15.32
PGF - Progressive Graphics File
|
Go to the documentation of this file.
29 #ifndef PGF_PGFTYPES_H
30 #define PGF_PGFTYPES_H
44 #define PGFMajorNumber 7
48 #define PPCAT_NX(A, B) A ## B
49 #define PPCAT(A, B) PPCAT_NX(A, B)
50 #define STRINGIZE_NX(A) #A
51 #define STRINGIZE(A) STRINGIZE_NX(A)
54 #define PGFCodecVersionID PPCAT(PPCAT(PPCAT(0x0, PGFMajorNumber), PGFYear), PGFWeek)
56 #define PGFCodecVersion STRINGIZE(PPCAT(PPCAT(PPCAT(PPCAT(PGFMajorNumber, .), PGFYear), .), PGFWeek))
61 #define PGFMagic "PGF"
65 #define DownsampleThreshold 3
66 #define ColorTableLen 256
75 #ifdef __PGF32SUPPORT__
76 #define PGFVersion (Version2 | PGF32 | Version5 | Version6 | Version7)
78 #define PGFVersion (Version2 | Version5 | Version6 | Version7)
84 #define BufferSize 16384
85 #define RLblockSizeLen 15
86 #define LinBlockSize 8
87 #define InterBlockSize 4
88 #ifdef __PGF32SUPPORT__
89 #define MaxBitPlanes 31
91 #define MaxBitPlanes 15
93 #define MaxBitPlanesLog 5
94 #define MaxQuality MaxBitPlanes
135 #ifdef PGF_USE_BIG_ENDIAN
143 #endif // PGF_USE_BIG_ENDIAN
151 PGFHeader() :
width(0),
height(0),
nLevels(0),
quality(0),
bpp(0),
channels(0),
mode(
ImageModeUnknown),
usedBitsPerChannel(0),
version(0, 0, 0) {}
183 #ifdef PGF_USE_BIG_ENDIAN
189 #endif // PGF_USE_BIG_ENDIAN
239 ASSERT(rect.left >= 0 && rect.right >= 0 && rect.left <= rect.right);
240 ASSERT(rect.top >= 0 && rect.bottom >= 0 && rect.top <= rect.bottom);
243 PGFRect& operator=(
const RECT& rect) {
267 #ifdef __PGF32SUPPORT__
278 #define MagicVersionSize sizeof(PGFMagicVersion)
279 #define PreHeaderSize sizeof(PGFPreHeader)
280 #define HeaderSize sizeof(PGFHeader)
281 #define ColorTableSize (ColorTableLen*sizeof(RGBQUAD))
282 #define DataTSize sizeof(DataT)
283 #define MaxUserDataSize 0x7FFFFFFF
285 #endif //PGF_PGFTYPES_H
IOException()
Standard constructor.
PGFRect(UINT32 x, UINT32 y, UINT32 width, UINT32 height)
PGFVersionNumber(UINT8 _major, UINT8 _year, UINT8 _week)
version number stored in header since major version 7
void(* RefreshCB)(void *p)
PGF identification and version.
#define RLblockSizeLen
block size length (< 16): ld(BufferSize) < RLblockSizeLen <= 2*ld(BufferSize)
UINT16 year
year since 2000 (year 2001 = 1)
UINT8 version
PGF version.
#define ColorTableLen
size of color lookup table (clut)
bool IsInside(UINT32 x, UINT32 y) const
UINT16 week
week number in a year
UINT16 major
major version number
PGFRect()
Standard constructor.
OSError error
operating system error code
char magic[3]
PGF identification = "PGF".