libpgf 7.26.45
PGF - Progressive Graphics File
Loading...
Searching...
No Matches
PGFplatform.h File Reference

PGF platform specific definitions. More...

#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstdint>

Go to the source code of this file.

Macros

#define __PGFROISUPPORT__
#define __PGF32SUPPORT__
#define __min(x, y)
#define __max(x, y)
#define __VAL(x)

Functions

constexpr uint32_t DWWIDTHBITS (uint32_t bits)
 < aligns scanline width in bits to DWORD value
constexpr uint32_t DWWIDTH (uint32_t bytes)
 DWWIDTH(bytes) - bytes.
constexpr uint32_t DWWIDTHREST (uint32_t bytes)

Variables

constexpr uint32_t WordWidth = 32
 WordBytes*8.
constexpr uint32_t WordWidthLog = 5
 ld of WordWidth
constexpr uint32_t WordMask = 0xFFFFFFE0
 least WordWidthLog bits are zero
constexpr uint32_t WordBytes = 4
 sizeof(uint32_t)
constexpr uint32_t WordBytesMask = 0xFFFFFFFC
 least WordBytesLog bits are zero
constexpr uint32_t WordBytesLog = 2
 ld of WordBytes
constexpr uint8_t ImageModeBitmap = 0
constexpr uint8_t ImageModeGrayScale = 1
constexpr uint8_t ImageModeIndexedColor = 2
constexpr uint8_t ImageModeRGBColor = 3
constexpr uint8_t ImageModeCMYKColor = 4
constexpr uint8_t ImageModeHSLColor = 5
constexpr uint8_t ImageModeHSBColor = 6
constexpr uint8_t ImageModeMultichannel = 7
constexpr uint8_t ImageModeDuotone = 8
constexpr uint8_t ImageModeLabColor = 9
constexpr uint8_t ImageModeGray16 = 10
constexpr uint8_t ImageModeRGB48 = 11
constexpr uint8_t ImageModeLab48 = 12
constexpr uint8_t ImageModeCMYK64 = 13
constexpr uint8_t ImageModeDeepMultichannel = 14
constexpr uint8_t ImageModeDuotone16 = 15
constexpr uint8_t ImageModeRGBA = 17
constexpr uint8_t ImageModeGray32 = 18
constexpr uint8_t ImageModeRGB12 = 19
constexpr uint8_t ImageModeRGB16 = 20
constexpr uint8_t ImageModeUnknown = 255

Detailed Description

PGF platform specific definitions.

Author
C. Stamm

Definition in file PGFplatform.h.

Macro Definition Documentation

◆ __max

#define __max ( x,
y )
Value:
((x) >= (y) ? (x) : (y))

Definition at line 107 of file PGFplatform.h.

◆ __min

#define __min ( x,
y )
Value:
((x) <= (y) ? (x) : (y))

Definition at line 106 of file PGFplatform.h.

◆ __PGF32SUPPORT__

#define __PGF32SUPPORT__

Definition at line 67 of file PGFplatform.h.

◆ __PGFROISUPPORT__

#define __PGFROISUPPORT__

Definition at line 60 of file PGFplatform.h.

◆ __VAL

#define __VAL ( x)
Value:
(x)

Definition at line 591 of file PGFplatform.h.

Function Documentation

◆ DWWIDTH()

uint32_t DWWIDTH ( uint32_t bytes)
constexpr

DWWIDTH(bytes) - bytes.

Definition at line 93 of file PGFplatform.h.

◆ DWWIDTHBITS()

uint32_t DWWIDTHBITS ( uint32_t bits)
constexpr

< aligns scanline width in bits to DWORD value

aligns scanline width in bytes to DWORD value

Definition at line 88 of file PGFplatform.h.

◆ DWWIDTHREST()

uint32_t DWWIDTHREST ( uint32_t bytes)
constexpr

Definition at line 98 of file PGFplatform.h.

98 {
99 return (WordBytes - bytes%WordBytes)%WordBytes;
100}
constexpr uint32_t WordBytes
sizeof(uint32_t)
Definition PGFplatform.h:76

Variable Documentation

◆ ImageModeBitmap

uint8_t ImageModeBitmap = 0
constexpr

Definition at line 113 of file PGFplatform.h.

◆ ImageModeCMYK64

uint8_t ImageModeCMYK64 = 13
constexpr

Definition at line 126 of file PGFplatform.h.

◆ ImageModeCMYKColor

uint8_t ImageModeCMYKColor = 4
constexpr

Definition at line 117 of file PGFplatform.h.

◆ ImageModeDeepMultichannel

uint8_t ImageModeDeepMultichannel = 14
constexpr

Definition at line 127 of file PGFplatform.h.

◆ ImageModeDuotone

uint8_t ImageModeDuotone = 8
constexpr

Definition at line 121 of file PGFplatform.h.

◆ ImageModeDuotone16

uint8_t ImageModeDuotone16 = 15
constexpr

Definition at line 128 of file PGFplatform.h.

◆ ImageModeGray16

uint8_t ImageModeGray16 = 10
constexpr

Definition at line 123 of file PGFplatform.h.

◆ ImageModeGray32

uint8_t ImageModeGray32 = 18
constexpr

Definition at line 131 of file PGFplatform.h.

◆ ImageModeGrayScale

uint8_t ImageModeGrayScale = 1
constexpr

Definition at line 114 of file PGFplatform.h.

◆ ImageModeHSBColor

uint8_t ImageModeHSBColor = 6
constexpr

Definition at line 119 of file PGFplatform.h.

◆ ImageModeHSLColor

uint8_t ImageModeHSLColor = 5
constexpr

Definition at line 118 of file PGFplatform.h.

◆ ImageModeIndexedColor

uint8_t ImageModeIndexedColor = 2
constexpr

Definition at line 115 of file PGFplatform.h.

◆ ImageModeLab48

uint8_t ImageModeLab48 = 12
constexpr

Definition at line 125 of file PGFplatform.h.

◆ ImageModeLabColor

uint8_t ImageModeLabColor = 9
constexpr

Definition at line 122 of file PGFplatform.h.

◆ ImageModeMultichannel

uint8_t ImageModeMultichannel = 7
constexpr

Definition at line 120 of file PGFplatform.h.

◆ ImageModeRGB12

uint8_t ImageModeRGB12 = 19
constexpr

Definition at line 132 of file PGFplatform.h.

◆ ImageModeRGB16

uint8_t ImageModeRGB16 = 20
constexpr

Definition at line 133 of file PGFplatform.h.

◆ ImageModeRGB48

uint8_t ImageModeRGB48 = 11
constexpr

Definition at line 124 of file PGFplatform.h.

◆ ImageModeRGBA

uint8_t ImageModeRGBA = 17
constexpr

Definition at line 130 of file PGFplatform.h.

◆ ImageModeRGBColor

uint8_t ImageModeRGBColor = 3
constexpr

Definition at line 116 of file PGFplatform.h.

◆ ImageModeUnknown

uint8_t ImageModeUnknown = 255
constexpr

Definition at line 134 of file PGFplatform.h.

◆ WordBytes

uint32_t WordBytes = 4
constexpr

sizeof(uint32_t)

Definition at line 76 of file PGFplatform.h.

◆ WordBytesLog

uint32_t WordBytesLog = 2
constexpr

ld of WordBytes

Definition at line 78 of file PGFplatform.h.

◆ WordBytesMask

uint32_t WordBytesMask = 0xFFFFFFFC
constexpr

least WordBytesLog bits are zero

Definition at line 77 of file PGFplatform.h.

◆ WordMask

uint32_t WordMask = 0xFFFFFFE0
constexpr

least WordWidthLog bits are zero

Definition at line 75 of file PGFplatform.h.

◆ WordWidth

uint32_t WordWidth = 32
constexpr

WordBytes*8.

Definition at line 73 of file PGFplatform.h.

◆ WordWidthLog

uint32_t WordWidthLog = 5
constexpr

ld of WordWidth

Definition at line 74 of file PGFplatform.h.