Class TBGRACustomColorQuantizer
Unit
Declaration
type TBGRACustomColorQuantizer = class(TObject)
Description
Abstract class for color quantization.
Quantization is the process by which each color is reduced to an index into a palette. Surrounding pixels can affect the approximate color, an effect called dithering.
Hierarchy
- TObject
- TBGRACustomColorQuantizer
Overview
Methods
constructor Create(ABitmap: TBGRACustomBitmap; AAlpha: TAlphaChannelPaletteOption); overload; virtual; abstract; |
|
constructor Create(AColors: array of TBGRAPixel; ASeparateAlphaChannel: boolean); overload; |
|
constructor Create(APalette: TBGRACustomPalette; ASeparateAlphaChannel: boolean); overload; virtual; abstract; |
|
constructor Create(ABitmap: TBGRACustomBitmap; AAlpha: TAlphaChannelPaletteOption; AReductionColorCount: integer); overload; virtual; abstract; |
|
constructor Create(AColors: array of TBGRAPixel; ASeparateAlphaChannel: boolean; AReductionColorCount: integer); overload; |
|
constructor Create(APalette: TBGRACustomPalette; ASeparateAlphaChannel: boolean; AReductionColorCount: integer); overload; virtual; abstract; |
|
function GetDitheredBitmap(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; ABounds: TRect): TBGRACustomBitmap; overload; virtual; abstract; |
|
function GetDitheredBitmap(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap): TBGRACustomBitmap; overload; |
|
function GetDitheredBitmapIndexedData(ABitDepth: integer; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap): Pointer; overload; |
|
function GetDitheredBitmapIndexedData(ABitDepth: integer; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; out AScanlineSize: PtrInt): Pointer; overload; |
|
function GetDitheredBitmapIndexedData(ABitDepth: integer; AByteOrder: TRawImageByteOrder; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; out AScanlineSize: PtrInt): Pointer; overload; virtual; abstract; |
|
function GetDominantColor: TBGRAPixel; virtual; |
|
function GetPalette: TBGRACustomApproxPalette; virtual; abstract; |
|
function GetReductionColorCount: integer; virtual; abstract; |
|
function GetSourceColor(AIndex: integer): TBGRAPixel; virtual; abstract; |
|
function GetSourceColorCount: Integer; virtual; abstract; |
|
procedure ApplyDitheringInplace(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; ABounds: TRect); overload; virtual; abstract; |
|
procedure ApplyDitheringInplace(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap); overload; |
|
procedure SaveBitmapToFile(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AFilenameUTF8: string); overload; |
|
procedure SaveBitmapToFile(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AFilenameUTF8: string; AFormat: TBGRAImageFormat); overload; |
|
procedure SaveBitmapToStream(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AStream: TStream; AFormat: TBGRAImageFormat); virtual; abstract; |
|
procedure SetReductionColorCount(AValue: Integer); virtual; abstract; |
Properties
property DominantColor: TBGRAPixel read GetDominantColor; |
|
property ReducedPalette: TBGRACustomApproxPalette read GetPalette; |
|
property ReductionColorCount: Integer read GetReductionColorCount write SetReductionColorCount; |
|
property SourceColor[AIndex: integer]: TBGRAPixel read GetSourceColor; |
|
property SourceColorCount: Integer read GetSourceColorCount; |
Description
Methods
constructor Create(ABitmap: TBGRACustomBitmap; AAlpha: TAlphaChannelPaletteOption); overload; virtual; abstract; |
|
This item has no description. |
constructor Create(AColors: array of TBGRAPixel; ASeparateAlphaChannel: boolean); overload; |
|
This item has no description. |
constructor Create(APalette: TBGRACustomPalette; ASeparateAlphaChannel: boolean); overload; virtual; abstract; |
|
This item has no description. |
constructor Create(ABitmap: TBGRACustomBitmap; AAlpha: TAlphaChannelPaletteOption; AReductionColorCount: integer); overload; virtual; abstract; |
|
This item has no description. |
constructor Create(AColors: array of TBGRAPixel; ASeparateAlphaChannel: boolean; AReductionColorCount: integer); overload; |
|
This item has no description. |
constructor Create(APalette: TBGRACustomPalette; ASeparateAlphaChannel: boolean; AReductionColorCount: integer); overload; virtual; abstract; |
|
This item has no description. |
function GetDitheredBitmap(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; ABounds: TRect): TBGRACustomBitmap; overload; virtual; abstract; |
|
This item has no description. |
function GetDitheredBitmap(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap): TBGRACustomBitmap; overload; |
|
This item has no description. |
function GetDitheredBitmapIndexedData(ABitDepth: integer; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap): Pointer; overload; |
|
This item has no description. |
function GetDitheredBitmapIndexedData(ABitDepth: integer; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; out AScanlineSize: PtrInt): Pointer; overload; |
|
This item has no description. |
function GetDitheredBitmapIndexedData(ABitDepth: integer; AByteOrder: TRawImageByteOrder; AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; out AScanlineSize: PtrInt): Pointer; overload; virtual; abstract; |
|
This item has no description. |
function GetDominantColor: TBGRAPixel; virtual; |
|
This item has no description. |
function GetPalette: TBGRACustomApproxPalette; virtual; abstract; |
|
This item has no description. |
function GetReductionColorCount: integer; virtual; abstract; |
|
This item has no description. |
function GetSourceColor(AIndex: integer): TBGRAPixel; virtual; abstract; |
|
This item has no description. |
function GetSourceColorCount: Integer; virtual; abstract; |
|
This item has no description. |
procedure ApplyDitheringInplace(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; ABounds: TRect); overload; virtual; abstract; |
|
This item has no description. |
procedure ApplyDitheringInplace(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap); overload; |
|
This item has no description. |
procedure SaveBitmapToFile(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AFilenameUTF8: string); overload; |
|
This item has no description. |
procedure SaveBitmapToFile(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AFilenameUTF8: string; AFormat: TBGRAImageFormat); overload; |
|
This item has no description. |
procedure SaveBitmapToStream(AAlgorithm: TDitheringAlgorithm; ABitmap: TBGRACustomBitmap; AStream: TStream; AFormat: TBGRAImageFormat); virtual; abstract; |
|
This item has no description. |
procedure SetReductionColorCount(AValue: Integer); virtual; abstract; |
|
This item has no description. |
Properties
property DominantColor: TBGRAPixel read GetDominantColor; |
|
This item has no description. |
property ReducedPalette: TBGRACustomApproxPalette read GetPalette; |
|
This item has no description. |
property ReductionColorCount: Integer read GetReductionColorCount write SetReductionColorCount; |
|
This item has no description. |
property SourceColor[AIndex: integer]: TBGRAPixel read GetSourceColor; |
|
This item has no description. |
property SourceColorCount: Integer read GetSourceColorCount; |
|
This item has no description. |