Class TDitheringToIndexedImage
Unit
Declaration
type TDitheringToIndexedImage = class(TObject)
Description
Handles dithering of an image
Hierarchy
- TObject
- TDitheringToIndexedImage
Overview
Fields
FBitOrder: TRawImageBitOrder; |
|
FBitsPerPixel: integer; |
|
FByteOrder: TRawImageByteOrder; |
|
FCurrentBitOrderMask: Int32or64; |
|
FCurrentData: PByte; |
|
FCurrentMaxY: Int32or64; |
|
FCurrentOutputScanline: PByte; |
|
FCurrentOutputY: Int32or64; |
|
FCurrentScanlineSize: PtrInt; |
|
FIgnoreAlpha: boolean; |
|
FLineOrder: TRawImageLineOrder; |
|
FPalette: TBGRACustomApproxPalette; |
|
FTransparentColorIndex: Int32or64; |
Methods
constructor Create(APalette: TBGRACustomApproxPalette; AIgnoreAlpha: boolean; ABitsPerPixelForIndices: integer); overload; |
|
constructor Create(APalette: TBGRACustomApproxPalette; AIgnoreAlpha: boolean; ABitsPerPixelForIndices: integer; AByteOrder: TRawImageByteOrder); overload; |
|
function AllocateSpaceForIndexedData(AImage: TBGRACustomBitmap; AScanlineSize: PtrInt): pointer; |
|
function ComputeMinimumScanlineSize(AWidthInPixels: integer): PtrInt; |
|
function DitherImage(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AScanlineSize: PtrInt): Pointer; overload; |
|
function DitherImage(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap): Pointer; overload; |
|
function GetScanline(Y: Int32or64): Pointer; virtual; |
|
function GetTransparentColorIndex: integer; |
|
procedure DitherImageTo(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AData: Pointer; AScanlineSize: PtrInt); overload; |
|
procedure DitherImageTo(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AData: Pointer); overload; |
|
procedure OutputPixelFullByte(X,Y: Int32or64; AColorIndex: Int32or64; AColor: TBGRAPixel); virtual; |
|
procedure OutputPixelSubByte(X,Y: Int32or64; AColorIndex: Int32or64; AColor: TBGRAPixel); virtual; |
|
procedure SetBitOrder(AValue: TRawImageBitOrder); virtual; |
|
procedure SetBitsPerPixel(AValue: integer); virtual; |
|
procedure SetByteOrder(AValue: TRawImageByteOrder); virtual; |
|
procedure SetIgnoreAlpha(AValue: boolean); |
|
procedure SetLineOrder(AValue: TRawImageLineOrder); |
|
procedure SetPalette(AValue: TBGRACustomApproxPalette); |
|
procedure SetTransparentColorIndex(AValue: integer); |
Properties
property BitOrder: TRawImageBitOrder read FBitOrder write SetBitOrder; |
|
property BitsPerPixel: integer read FBitsPerPixel write SetBitsPerPixel; |
|
property ByteOrder: TRawImageByteOrder read FByteOrder write SetByteOrder; |
|
property DefaultTransparentColorIndex: integer read GetTransparentColorIndex write SetTransparentColorIndex; |
|
property IgnoreAlpha: boolean read FIgnoreAlpha write SetIgnoreAlpha; |
|
property LineOrder: TRawImageLineOrder read FLineOrder write SetLineOrder; |
|
property Palette: TBGRACustomApproxPalette read FPalette write SetPalette; |
Description
Fields
FBitOrder: TRawImageBitOrder; |
|
This item has no description. |
FBitsPerPixel: integer; |
|
This item has no description. |
FByteOrder: TRawImageByteOrder; |
|
This item has no description. |
FCurrentBitOrderMask: Int32or64; |
|
This item has no description. |
FCurrentData: PByte; |
|
This item has no description. |
FCurrentMaxY: Int32or64; |
|
This item has no description. |
FCurrentOutputScanline: PByte; |
|
This item has no description. |
FCurrentOutputY: Int32or64; |
|
This item has no description. |
FCurrentScanlineSize: PtrInt; |
|
following variables are used during dithering |
FIgnoreAlpha: boolean; |
|
This item has no description. |
FLineOrder: TRawImageLineOrder; |
|
This item has no description. |
FPalette: TBGRACustomApproxPalette; |
|
This item has no description. |
FTransparentColorIndex: Int32or64; |
|
This item has no description. |
Methods
constructor Create(APalette: TBGRACustomApproxPalette; AIgnoreAlpha: boolean; ABitsPerPixelForIndices: integer); overload; |
|
This item has no description. |
constructor Create(APalette: TBGRACustomApproxPalette; AIgnoreAlpha: boolean; ABitsPerPixelForIndices: integer; AByteOrder: TRawImageByteOrder); overload; |
|
use platform byte order |
function AllocateSpaceForIndexedData(AImage: TBGRACustomBitmap; AScanlineSize: PtrInt): pointer; |
|
This item has no description. |
function ComputeMinimumScanlineSize(AWidthInPixels: integer): PtrInt; |
|
This item has no description. |
function DitherImage(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AScanlineSize: PtrInt): Pointer; overload; |
|
use minimum scanline size |
function DitherImage(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap): Pointer; overload; |
|
maybe necessary if larger than 8 bits per pixel |
function GetScanline(Y: Int32or64): Pointer; virtual; |
|
This item has no description. |
function GetTransparentColorIndex: integer; |
|
This item has no description. |
procedure DitherImageTo(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AData: Pointer; AScanlineSize: PtrInt); overload; |
|
use minimum scanline size |
procedure DitherImageTo(AAlgorithm: TDitheringAlgorithm; AImage: TBGRACustomBitmap; AData: Pointer); overload; |
|
This item has no description. |
procedure OutputPixelFullByte(X,Y: Int32or64; AColorIndex: Int32or64; AColor: TBGRAPixel); virtual; |
|
This item has no description. |
procedure OutputPixelSubByte(X,Y: Int32or64; AColorIndex: Int32or64; AColor: TBGRAPixel); virtual; |
|
This item has no description. |
procedure SetBitOrder(AValue: TRawImageBitOrder); virtual; |
|
This item has no description. |
procedure SetBitsPerPixel(AValue: integer); virtual; |
|
This item has no description. |
procedure SetByteOrder(AValue: TRawImageByteOrder); virtual; |
|
This item has no description. |
procedure SetIgnoreAlpha(AValue: boolean); |
|
This item has no description. |
procedure SetLineOrder(AValue: TRawImageLineOrder); |
|
This item has no description. |
procedure SetPalette(AValue: TBGRACustomApproxPalette); |
|
This item has no description. |
procedure SetTransparentColorIndex(AValue: integer); |
|
This item has no description. |
Properties
property BitOrder: TRawImageBitOrder read FBitOrder write SetBitOrder; |
|
This item has no description. |
property BitsPerPixel: integer read FBitsPerPixel write SetBitsPerPixel; |
|
optional customization of format |
property ByteOrder: TRawImageByteOrder read FByteOrder write SetByteOrder; |
|
This item has no description. |
property DefaultTransparentColorIndex: integer read GetTransparentColorIndex write SetTransparentColorIndex; |
|
when there is no transparent color in the palette, or that IgnoreAlpha is set to True, this allows to define the index for the fully transparent color |
property IgnoreAlpha: boolean read FIgnoreAlpha write SetIgnoreAlpha; |
|
This item has no description. |
property LineOrder: TRawImageLineOrder read FLineOrder write SetLineOrder; |
|
This item has no description. |
property Palette: TBGRACustomApproxPalette read FPalette write SetPalette; |
|
This item has no description. |