Definitions of several special types (including Raw Image) to be used for graphics
TRawImageDescription
- a descriptor record for Raw Images
Note: not all devices/images have all parts at any time. But if a part can be applied to the device/image, the 'Description' describes its structure.
Format
- whether RGB+/- Alpha or greyscale, or uninitialised
Depth
- used bits per pixel
Width
of the image
Height
of the image
PaletteColorCount
- entries in color palette. 0 when no palette.
BitOrder
- whether bit 0 or bit 7 is stored first
ByteOrder
- whether Most Significant Byte (MSB) or Least SB is stored first
LineOrder
- whether line 0 represents the top or the bottom line
BitsPerPixel
- can be greater than Depth
LineEnd
- whether lines end at Byte, Word, Double or Quad Word (etc) boundary, or there is no gap at the end of a line
RedPrec
- number of bits of precision for red
RedShift
number of bits to shift red (least to most significant)
GreenPrec
- number of bits of precision for green
GreenShift
number of bits to shift green (least to most significant)
BluePrec
- number of bits of precision for blue
BlueShift
number of bits to shift blue (least to most significant)
AlphaPrec
- number of bits of precision for alpha
AlphaShift
number of bits to shift alpha (least to most significant)
PRawImageDescription
- pointer to TRawImageDescription
TRawImage
a Raw Image (such as a digital photograph before compression)
Description
record for the Raw Image
Data
- a pointer to the actual data of the image
DataSize
- pointer to the size of the image
Mask
- pointer to the Mask for use with the image
MaskSize
- pointer to the size of the mask
Palette
- pointer to the palette of colours for this image
PaletteSize
- pointer to the size of the palette
PRawImage
- pointer to a TRawImage
TRawImagePosition
- record describing the position of a Raw Image
PRawImagePosition
- pointer to a TRawImagePosition
GetBitsPerLine
- returns the number of bits per line (as a pointer)
MaskBitsPerPixel
- bits per mask pixel, usually 1, 0 when no mask

Values are only valid, if there is a mask (MaskBitsPerPixel > 0)

Masks are always separate with a depth of 1 bpp. One pixel can occupy one byte at most

A value of 1 means that pixel is masked; a value of 0 means the pixel value is shown

MaskShift
- the shift (=position) of the mask bit
MaskLineEnd
- how the line is to be ended
MaskBitOrder
- bit order to use for the mask
PaletteBitsPerIndex
- bits per palette index, this can be larger than the colors used
PaletteShift
- bitshift. Direction: from least to most significant
PaletteLineEnd
- how lines are ended in the palette
PaletteBitOrder
- bit order for the palette
PaletteByteOrder
- byte order for the palette
Init
- initialise the image descriptor. Don't use a contructor here, it will break compatibility with a record
Init_BPP24_B8G8R8_BIO_TTB
- initiator for specified format

Init_BPP24_B8G8R8_BIO_TTB - initiator for specified format

    { pf24bit:

     Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=24 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
    }

Init_BPP24_B8G8R8_M1_BIO_TTB
- initiator for specfied format

Init_BPP24_B8G8R8_M1_BIO_TTB - initiator for specfied format

    { pf24bit:

     Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=24 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
     Masked
    }

Init_BPP32_B8G8R8_BIO_TTB
- initiator for specified format

Init_BPP32_B8G8R8_BIO_TTB - initiator for specified format

    { pf32bit:

     Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=32 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
     No alpha
     No mask
    }

Init_BPP32_B8G8R8_M1_BIO_TTB
- initiator for specified format

Init_BPP32_B8G8R8_M1_BIO_TTB - initiator for specified format

    { pf32bit:

     Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=32 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
     no alpha
     with mask
    }

Init_BPP32_B8G8R8A8_BIO_TTB
- initiator for specified format

Init_BPP32_B8G8R8A8_BIO_TTB - initiator for specified format

    { pf32bit:

     Format=ricfRGBA HasPalette=false Depth=32 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=32 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
     alpha
     no mask
    }

Init_BPP32_B8G8R8A8_M1_BIO_TTB
- initiator for specified format

Init_BPP32_B8G8R8A8_M1_BIO_TTB - initiator for specified format

    { pf32bit:

     Format=ricfRGBA HasPalette=false Depth=32 PaletteColorCount=0
     BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
     LineOrder=riloTopToBottom
     BitsPerPixel=32 LineEnd=rileDWordBoundary
     RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
     alpha
     masked
    }

GetDescriptionFromMask
- returns an image descriptor obtained from the mask
GetDescriptionFromAlpha
- returns an image descriptor obtained from the Alpha
The number of BytesPerLine. Returns a pointer
The number of BitsPerLine. Returns a pointer
The number of MaskBytesPerLine. Returns a pointer
The number of MaskBitsPerLine. Returns a pointer
AsString
- returns the image as a string
IsEqual
- compares th ecurrent descriptor with another, and returns True if they are equal
Init
- initiator for the object. Don't use a contructor here, it will break compatibility with a record
CreateData
- method to create the data for the record
FreeData
- releases data that had previously been locked or made unavailable
ReleaseData
- frees the resources when finished with th edata
ExtractRect
- find the position of the bounding rectangle from the raw data
PerformEffect
- applies a specified special effect to the data of the Raw Image
ReadBits
- reads the bit values for the raw image data at a given position
ReadChannels
- reads the (R, G, B, Alpha) channel values at a given position in the raw data
ReadMask
- reads the Mask data at the given position in the raw image
WriteBits
- writes the specified bit values at the nominated position in the data
WriteChannels
- writes the specified channel values at the nominated position
IsMasked
- returns True if the specified pixels are masked
IsTransparent
- returns True if the specified pixels are transparent
IsEqual
- returns True if the current and specified images are equal
TRawImageLineStarts
- contains a list of the start positions of the lines in the Raw Image
Positions
- the array of start positions
Init
- initiator for the object. Don't use a constructor here, it will break compatibility with a record
GetPosition
- returns the position specified by x, y coordinates as a TRawImagePosition
PRawImageLineStarts
- pointer to TRawImageLineStarts
GetBytesPerLine
- returns the number of bytes per line (as a pointer)
CopyImageData
- copies data from ASource to ADestination, returning True if successful