[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'GraphType' (#lazutils)

TRawImageDescription

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Descriptor object for the image format of devices and raw (uncompressed) image data.

Declaration

Source position: graphtype.pp line 116

type TRawImageDescription = object

  Format: TRawImageColorFormat;

  

An initialized image can contain color (RGBA) or monochrome pixels.

  Width: Cardinal;

  

Width of the image in pixels.

  Height: Cardinal;

  

Height of the image in pixels.

  Depth: Byte;

  

Number of bits used per pixel.

  BitOrder: TRawImageBitOrder;

  

Indicates the bit order for scanlines in the raw image data.

  ByteOrder: TRawImageByteOrder;

  

The LSB/MSB-first byte order for color data.

  LineOrder: TRawImageLineOrder;

  

The first stored line of pixels can represent the logical top or bottom of the displayed image.

  LineEnd: TRawImageLineEnd;

  

Alignment of the scanlines.

  BitsPerPixel: Byte;

  

Number of bits stored per pixel.

  RedPrec: Byte;

  

Bits per pixel in the Red channel.

  RedShift: Byte;

  

Bit offset of the Red channel in color data.

  GreenPrec: Byte;

  

Bits per pixel in the Green channel.

  GreenShift: Byte;

  

Bit offset of the Green channel in color data.

  BluePrec: Byte;

  

Bits per pixel in the Blue channel.

  BlueShift: Byte;

  

Bit offset of the Blue channel in color data.

  AlphaPrec: Byte;

  

Bits per pixel in the Alpha channel.

  AlphaShift: Byte;

  

Bit offset of the Alpha channel in color data.

  MaskBitsPerPixel: Byte;

  

Bits per mask pixel, usually 1, 0 when no mask.

  MaskShift: Byte;

  

The bit offset of the mask bit.

  MaskLineEnd: TRawImageLineEnd;

  

Alignment of Mask lines.

  MaskBitOrder: TRawImageBitOrder;

  

Bit order of the Mask.

  PaletteColorCount: Word;

  

Entries in the color palette, 0 when no palette.

  PaletteBitsPerIndex: Byte;

  

Bits per palette index, stored in the pixel data.

  PaletteShift: Byte;

  

Bit shift direction from least to most significant.

  PaletteLineEnd: TRawImageLineEnd;

  

Indicates the alignment or padding used at the end of a scanline in the raw image data.

  PaletteBitOrder: TRawImageBitOrder;

  

Bit order of the palette indices.

  PaletteByteOrder: TRawImageByteOrder;

  

Byte order of the palette indices.

  procedure Init;

  

Initialize the image descriptor to all zeroes.

  procedure Init_BPP1();

  

1-bit mono format.

  procedure Init_BPP16_R5G6B5();

  

16-bit format.

  procedure Init_BPP24_R8G8B8_BIO_TTB();

  

24-bit format with bits in RGB order from top to bottom.

  procedure Init_BPP24_R8G8B8_BIO_TTB_UpsideDown();

  

24-bit format with bits in RGB order from bottom to top.

  procedure Init_BPP32_A8R8G8B8_BIO_TTB();

  

32-bit format with an Alpha channel, bits in RGB order from top to bottom.

  procedure Init_BPP32_R8G8B8A8_BIO_TTB();

  

32-bit format with bits in RGB order plus an Alpha channel, ordered from top to bottom.

  procedure Init_BPP24_B8G8R8_BIO_TTB();

  

Init for an unmasked 24 bit RGB image (LSB Blue).

  procedure Init_BPP24_B8G8R8_M1_BIO_TTB();

  

Init for a masked 24 bit RGB image (LSB Blue).

  procedure Init_BPP32_B8G8R8_BIO_TTB();

  

Init for an unmasked 32 bit RGB image (LSB blue).

  procedure Init_BPP32_B8G8R8_M1_BIO_TTB();

  

Init for a masked 32 bit RGB image (LSB blue).

  procedure Init_BPP32_B8G8R8A8_BIO_TTB();

  

Init for an unmasked 32 bit RGBA image (LSB blue).

  procedure Init_BPP32_B8G8R8A8_M1_BIO_TTB();

  

Init for a masked 32 bit RGBA image (LSB blue).

  function GetDescriptionFromMask;

  

Returns an monochrome image descriptor constructed from the Mask.

  function GetDescriptionFromAlpha;

  

Returns an monochrome image descriptor constructed from the Alpha channel.

  procedure GetRGBIndices();

  

Gets the indices of channels in four-element array.

  function BytesPerLine;

  

The number of bytes per scanline.

  function BitsPerLine;

  

The number of bits per scanline.

  function MaskBytesPerLine;

  

The number of bytes per Mask scanline.

  function MaskBitsPerLine;

  

The number of bits per Mask scanline.

  function AsString;

  

The image descriptor as a string.

  function IsEqual();

  

Compares with the given description, returns True if it is equal.

end;

Inheritance

TRawImageDescription

  

Descriptor object for the image format of devices and raw (uncompressed) image data.

Description

This effectively is a record with some attached methods. More related procedures exist outside the object.

The object describes the presence and exact storage of the RGBA image and mask pixels, of a device or image. The color information is stored in aligned scanlines.

Note: palettes, BitOrder and ByteOrder seem not to be implemented yet. The meaning of the PaletteXXX values and of BitOrder is undefined, so far.

xxxBitsPerPixel and xxxPrecisionMask applies to color data. For masked images, the pixels and the mask are two different arrays, containing different elements.

See also

TRawImage

  

An uncompressed graphics image (bitmap).


Version 3.2 Generated 2024-02-25 Home