UBITMAP
Jednotka obsahuje základní typy pro práci s bitmapami.
unit uBitMap;
{=================================================================}
{ }
{ SW pro terminaly SofCon V2.51 17.03.2003 Bu }
{ }
{ Zakladni typy pro praci s BMP }
{ }
{ (C) 1996-1997, SofCon s.r.o., Stresovicka 49, Praha 6 }
{ Vypracoval: R.Bukovsky }
{=================================================================}
{ $I Sets.inc}
interface
const
cVerNo = $0251; { BCD format }
cVer = '02.51,17.03.2003';
{ Bitmap header definition }
type
PBitmap = ^TBitmap;
TBitmap = record
bmType :integer;
bmWidth :integer;
bmHeight :integer;
bmWidthBytes :integer;
bmPlanes :byte;
bmBitsPixel :byte;
bmBits :pointer;
end;
type
TRGBTriple = record
rgbtBlue :byte;
rgbtGreen :byte;
rgbtRed :byte;
end;
type
TRGBQuad = record
rgbBlue :byte;
rgbGreen :byte;
rgbRed :byte;
rgbReserved:byte;
end;
{ Structures for defining DIBs }
type
PBitmapCoreHeader = ^TBitmapCoreHeader;
TBitmapCoreHeader = record
bcSize :longint; { used to get to color table }
bcWidth :word;
bcHeight :word;
bcPlanes :word;
bcBitCount :word;
end;
type
PBitmapInfoHeader = ^TBitmapInfoHeader;
TBitmapInfoHeader = record
biSize :longint;
biWidth :longint;
biHeight :longint;
biPlanes :word;
biBitCount :word;
biCompression :longint;
biSizeImage :longint;
biXPelsPerMeter:longint;
biYPelsPerMeter:longint;
biClrUsed :longint;
biClrImportant :longint;
end;
{ Constants for the biCompression field }
const
bi_RGB = 0;
bi_RLE8 = 1;
bi_RLE4 = 2;
type
PBitmapInfo = ^TBitmapInfo;
TBitmapInfo = record
bmiHeader :TBitmapInfoHeader;
bmiColors :array[0..0] of TRGBQuad;
end;
type
PBitmapCoreInfo = ^TBitmapCoreInfo;
TBitmapCoreInfo = record
bmciHeader :TBitmapCoreHeader;
bmciColors :array[0..0] of TRGBTriple;
end;
type
PBitmapFileHeader = ^TBitmapFileHeader;
TBitmapFileHeader = record
bfType :word;
bfSize :longint;
bfReserved1 :word;
bfReserved2 :word;
bfOffBits :longint;
end;
{======================================================================================}
{ Typy pouzivane v SW pro terminaly SofCon }
{======================================================================================}
tBmpImageType =
(bmpit_VideoRWM, { 1:1 obsah VideoRWM }
bmpit_RLE1_VideoRWM); { Run-Length Encoded format for commpressed VideoRWM }
pBmpHeader =^tBmpHeader;
tBmpHeader = record
bhdSize :word; { delka tBmpHeader = offset pocatku BmpImage }
bhdType :tBmpImageType; { typ zakodovani BMP v bloku za touto hlavickou }
bhdWidth :word; { sirka BMP v pixel }
bhdHeight :word; { vyska BMP v pixel }
end;
{######################################################################################}
implementation