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

TRawImage

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

An uncompressed graphics image (bitmap).

Declaration

Source position: graphtype.pp line 204

type TRawImage = object

  Description: TRawImageDescription;

  

Description record for the Raw Image.

  Data: PByte;

  

Data - a pointer to the actual data of the image.

  DataSize: PtrUInt;

  

DataSize - pointer to the size of the image.

  Mask: PByte;

  

Mask - pointer to the Mask for use with the image.

  MaskSize: PtrUInt;

  

MaskSize - pointer to the size of the mask.

  Palette: PByte;

  

Palette - pointer to the palette of colors for this image.

  PaletteSize: PtrUInt;

  

PaletteSize - pointer to the size of the palette.

  procedure Init;

  

Init - initiator for the object. Don't use a constructor here, it will break compatibility with a record.

  procedure CreateData();

  

CreateData - method to create the data for the record.

  procedure FreeData;

  

Destroys the allocated Data, Mask and Palette arrays.

  procedure ReleaseData;

  

ReleaseData - frees the resources when finished with the data.

  procedure ExtractRect();

  

ExtractRect - find the position of the bounding rectangle from the raw data.

  function GetLineStart();

  

Gets a pointer to the byte position at the beginning of the specified scanline.

  procedure PerformEffect();

  

PerformEffect - applies a specified special effect to the data of the Raw Image.

  function ReadBits();

  

ReadBits - reads the bit values for the raw image data at a given position.

  procedure ReadChannels();

  

Reads the Red, Green, Blue and Alpha channel values at a given position in pixel data.

  procedure ReadMask();

  

Reads the Mask value at the given position in the image data.

  procedure WriteBits();

  

Writes ABits into Data at the given position.

  procedure WriteChannels();

  

WriteChannels - writes the specified channel values at the nominated position.

  procedure WriteMask();

  

Writes the mask for the raw image when assigned and given a valid bit depth in the image description.

  function IsMasked();

  

IsMasked - returns True if the specified pixels are masked.

  function IsTransparent();

  

IsTransparent - returns True if the specified pixels are transparent.

  function IsEqual();

  

IsEqual - returns True if the current and specified images are equal.

end;

Inheritance

TRawImage

  

An uncompressed graphics image (bitmap).

Description

This object hold the pixels, mask and color palette of the image, as well as a detailed description of the storage format of these parts.

This object currently is subject to refactoring, don't use it in application code.


Version 3.2 Generated 2024-02-25 Home