***************************************************************************} { } { file: MYCOLOR.PAS } { title: DIB handling unit } { version: 1.0.32 } { date: 2/10/98 } { author: Andreas Heckel } { Mail: andreas.heckel@wirtschaft.tu-ilmenau.de } { copyright: DELPHI STORAGE } { Web: http://www.wirtschaft.tu-ilmenau.de/~aeg/ } { } { compiler: Borland DELPHI 2.0 } { descript.: required DIB handling unit for TPicBtn and TFormShaper } { } { revision history: } { 2/10/98 first release } { } { Category: FREEWARE } { Can you please put a link to the site in your list and not just the zip } {
ColorDepth - Test if 16 or 256 Colors
ColorToTriple -
GetDIPixelTriple - Number of bits per pixel
GetPixelTriple -
GetSizes - prepares Bitmap Header
InitBitmapInfoHeader -
MyGetDIBits -
MyGetLogPalette -
MyInitDIBits - Drawing context
PaletteInstalled -
QuadToColor -
SetDIPixelColor -
SetDIPixelTriple -
SetPixelTriple - Get the information about the Bitmap
TripleToColor -
NumColors
FUNCTION ColorDepth:BYTE;
Test if 16 or 256 Colors
FUNCTION ColorToTriple(aColor:DWORD):TRGBTriple;
FUNCTION GetDIPixelTriple(BIP:PBitmapInfo;Buf:Pointer;aPalette:HPalette; x,y:Integer;var aTriple:TRGBTriple):Boolean;
Number of bits per pixel
FUNCTION GetPixelTriple(aBitmap:TBitmap;aLogPalette: PLogPalette; x,y:Integer;var aTriple:TRGBTriple):Boolean;
PROCEDURE GetSizes(HBM: HBITMAP; var BIPSize:Integer; var BufSize:DWord;var BitCount:Word;var ColorSize : Longint);
prepares Bitmap Header
PROCEDURE InitBitmapInfoHeader(HBM: HBitmap;var BI: TBitmapInfoHeader);
FUNCTION MyGetDIBits(HBM: HBITMAP; var BIP:PBitmapInfo; var Buf:Pointer; var aLogPalette:PLogPalette): Boolean;
FUNCTION MyGetLogPalette(Var aPalette:HPalette;Var aLogPalette:PLogPalette;ReWrite:Boolean):Boolean;
FUNCTION MyInitDIBits(HBM: HBITMAP; var BIP:PBitmapInfo; var Buf:Pointer; var aLogPalette:PLogPalette): Boolean;
Drawing context
FUNCTION PaletteInstalled:Bool;
FUNCTION QuadToColor(aQuad:TRGBQuad):TColor;
FUNCTION SetDIPixelColor(var BIP:PBitmapInfo; var Buf:Pointer;aPalette:HPalette; x,y:Integer;aColor:TColor):Boolean;
FUNCTION SetDIPixelTriple(var BIP:PBitmapInfo; var Buf:Pointer;aPalette:HPalette; x,y:Integer;aTriple:TRGBTriple):Boolean;
FUNCTION SetPixelTriple(aBitmap:TBitmap;aLogPalette: PLogPalette; x,y:Integer;aTriple:TRGBTriple):Boolean;
Get the information about the Bitmap
FUNCTION TripleToColor(aTriple:TRGBTriple):TColor;
NumColors = 256