Class TDIB (unit DIB)

Inherits from

TGraphic

Constructors


constructor Create;



Functions

procedure Assign(Source: TPersistent);


procedure Blur(ABitCount: Integer; Radius: Integer);

Special effect

procedure Clear;


procedure Compress;


procedure Decompress;


destructor Destroy;


procedure Dormant;


procedure FreeImage;


procedure Greyscale(ABitCount: Integer);

The average is written.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE);


procedure LoadFromStream(Stream: TStream);


procedure Mirror(MirrorX, MirrorY: Boolean);


procedure Negative;


procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE);


procedure SaveToStream(Stream: TStream);


procedure SetSize(AWidth, AHeight, ABitCount: Integer);


procedure UpdatePalette;


procedure DefineProperties(Filer: TFiler);


procedure Draw(ACanvas: TCanvas; const Rect: TRect);


function GetEmpty: Boolean;


function GetHeight: Integer;


function GetPalette: HPalette;


function GetWidth: Integer;


procedure ReadData(Stream: TStream);

Is the head 'BM'?

procedure SetHeight(Value: Integer);


procedure SetPalette(Value: HPalette);


procedure SetWidth(Value: Integer);


procedure WriteData(Stream: TStream);


procedure CanvasChanging(Sender: TObject);


procedure Changing(MemoryImage: Boolean);


procedure ConvertBitCount(ABitCount: Integer);


procedure EndProgress;


function GetBitmapInfo: PBitmapInfo;


function GetBitmapInfoSize: Integer;


function GetCanvas: TCanvas;


function GetHandle: THandle;


function GetPaletteCount: Integer;


function GetPBits: Pointer;


function GetPixel(X, Y: Integer): Integer;


function GetScanLine(Y: Integer): Pointer;


function GetTopPBits: Pointer;


procedure SetBitCount(Value: Integer);


procedure SetImage(Value: TDIBSharedImage);


procedure SetNowPixelFormat(const Value: TDIBPixelFormat);


procedure SetPixel(X, Y: Integer; Value: Integer);


procedure StartProgress(const Name: string);

Special effect

procedure UpdateProgress(PercentY: Integer);


Properties

property BitCount : Integer


property BitmapInfo : PBitmapInfo


property BitmapInfoSize : Integer


property Canvas : TCanvas


property Handle : THandle


property Height : Integer


property NextLine : Integer


property NowPixelFormat : TDIBPixelFormat


property PaletteCount : Integer


property PBits : Pointer


property Pixels : Integer


property ScanLine : Pointer


property Size : Integer


property TopPBits : Pointer


property Width : Integer


property WidthBytes : Integer


property Image : TDIBSharedImage


Events

Variables

ColorTable : TRGBQuads;


PixelFormat : TDIBPixelFormat;


FBitCount : Integer;

For speed-up

FCanvas : TCanvas;


FHeight : Integer;


FImage : TDIBSharedImage;


FNextLine : Integer;


FNowPixelFormat : TDIBPixelFormat;


FPBits : Pointer;


FProgressName : string;


FProgressOld : Integer;


FProgressOldTime : Integer;


FProgressOldY : Integer;


FProgressY : Integer;


FSize : Integer;


FTopPBits : Pointer;


FWidth : Integer;


FWidthBytes : Integer;



Constructors


constructor Create;


Functions


procedure Assign(Source: TPersistent);


procedure Blur(ABitCount: Integer; Radius: Integer);

Special effect


procedure Clear;


procedure Compress;


procedure Decompress;


destructor Destroy;


procedure Dormant;


procedure FreeImage;


procedure Greyscale(ABitCount: Integer);

The average is written.


procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE);


procedure LoadFromStream(Stream: TStream);


procedure Mirror(MirrorX, MirrorY: Boolean);


procedure Negative;


procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE);


procedure SaveToStream(Stream: TStream);


procedure SetSize(AWidth, AHeight, ABitCount: Integer);


procedure UpdatePalette;


procedure DefineProperties(Filer: TFiler);


procedure Draw(ACanvas: TCanvas; const Rect: TRect);


function GetEmpty: Boolean;


function GetHeight: Integer;


function GetPalette: HPalette;


function GetWidth: Integer;


procedure ReadData(Stream: TStream);

Is the head 'BM'?


procedure SetHeight(Value: Integer);


procedure SetPalette(Value: HPalette);


procedure SetWidth(Value: Integer);


procedure WriteData(Stream: TStream);


procedure CanvasChanging(Sender: TObject);


procedure Changing(MemoryImage: Boolean);


procedure ConvertBitCount(ABitCount: Integer);


procedure EndProgress;


function GetBitmapInfo: PBitmapInfo;


function GetBitmapInfoSize: Integer;


function GetCanvas: TCanvas;


function GetHandle: THandle;


function GetPaletteCount: Integer;


function GetPBits: Pointer;


function GetPixel(X, Y: Integer): Integer;


function GetScanLine(Y: Integer): Pointer;


function GetTopPBits: Pointer;


procedure SetBitCount(Value: Integer);


procedure SetImage(Value: TDIBSharedImage);


procedure SetNowPixelFormat(const Value: TDIBPixelFormat);


procedure SetPixel(X, Y: Integer; Value: Integer);


procedure StartProgress(const Name: string);

Special effect


procedure UpdateProgress(PercentY: Integer);


Properties


property BitCount : Integer


property BitmapInfo : PBitmapInfo


property BitmapInfoSize : Integer


property Canvas : TCanvas


property Handle : THandle


property Height : Integer


property NextLine : Integer


property NowPixelFormat : TDIBPixelFormat


property PaletteCount : Integer


property PBits : Pointer


property Pixels : Integer


property ScanLine : Pointer


property Size : Integer


property TopPBits : Pointer


property Width : Integer


property WidthBytes : Integer


property Image : TDIBSharedImage


Events


Variables


ColorTable : TRGBQuads;


PixelFormat : TDIBPixelFormat;


FBitCount : Integer;

For speed-up


FCanvas : TCanvas;


FHeight : Integer;


FImage : TDIBSharedImage;


FNextLine : Integer;


FNowPixelFormat : TDIBPixelFormat;


FPBits : Pointer;


FProgressName : string;


FProgressOld : Integer;


FProgressOldTime : Integer;


FProgressOldY : Integer;


FProgressY : Integer;


FSize : Integer;


FTopPBits : Pointer;


FWidth : Integer;


FWidthBytes : Integer;