1
{****************************************************************************
3
$Id: pmbitmap.pas,v 1.4 2002/11/02 11:16:38 hajny Exp $
5
This file is part of the Free Pascal run time library.
6
Copyright (c) 1999-2002 by the Free Pascal development team.
7
Copyright (c) 1999-2000 by Ramon Bosque
9
Types and constants for bitmap images manipulation
10
plus functions implemented in PMPIC.DLL.
12
See the file COPYING.FPC, included in this distribution,
13
for details about the copyright.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
****************************************************************************}
26
type TBitmapInfoHeader=record
33
PBitmapInfoHeader=^TBitmapInfoHeader;
34
BitmapInfoHeader=TBitmapInfoHeader;
50
aRgbColor:array[0..0] of TRgb;
52
PBitmapInfo=^TBitmapInfo;
53
BitmapInfo=TBitmapInfo;
55
TBitmapInfoHeader2=record
56
cbFix:cardinal; { Length of structure }
57
cx:cardinal; { Bitmap width in pels }
58
cy:cardinal; { Bitmap height in pels }
59
cPlanes:word; { Number of bit planes }
60
cBitCount:word; { Number of bits per pel within a plane }
61
ulCompression:cardinal; { Compression scheme used
63
cbImage:cardinal; { Length of bitmap storage data in bytes }
64
cxResolution:cardinal; { X resolution of target device }
65
cyResolution:cardinal; { Y resolution of target device }
66
cClrUsed:cardinal; { Number of color indices used }
67
cClrImportant:cardinal; { Number of important color indices }
68
usUnits:word; { Units of measure }
70
usRecording:word; { Recording algorithm }
71
usRendering:word; { Halftoning algorithm }
72
cSize1:cardinal; { Size value 1 }
73
cSize2:cardinal; { Size value 2 }
74
ulColorEncoding:cardinal; { Color encoding }
75
ulIdentifier:cardinal; { Reserved for application use }
77
PBitmapInfoHeader2=^TBitmapInfoHeader2;
78
BitmapInfoHeader2=TBitmapInfoHeader2;
84
fcOptions:byte; { Reserved, must be zero }
95
ulCompression:cardinal;
97
cxResolution:cardinal;
98
cyResolution:cardinal;
100
cClrImportant:cardinal;
107
ulColorEncoding:cardinal;
108
ulIdentifier:cardinal;
109
aRgbColor:array[0..0] of TRgb2;
111
PBitmapInfo2=^TBitmapInfo2;
112
BitmapInfo2=TBitmapInfo2;
114
TBitmapFileHeader=record
120
bmp:TBitmapInfoHeader;
122
PBitmapFileHeader=^TBitmapFileHeader;
123
BitmapFileHeader=TBitmapFileHeader;
125
TBitmapArrayFileHeader=record
131
bfh:TBitmapFileHeader;
133
PBitmapArrayFileHeader=^TBitmapArrayFileHeader;
134
BitmapArrayFileHeader=TBitmapArrayFileHeader;
136
TBitmapFileHeader2=record
142
bmp2:TBitmapInfoHeader2;
144
PBitmapFileHeader2=^TBitmapFileHeader2;
145
BitmapFileHeader2=TBitmapFileHeader2;
147
TBitmapArrayFileHeader2=record
153
bfh2:TBitmapFileHeader2;
155
PBitmapArrayFileHeader2=^TBitmapArrayFileHeader2;
156
BitmapArrayFileHeader2=TBitmapArrayFileHeader2;
158
{ Constants for compression/decompression command }
159
const CBD_COMPRESSION = 1;
160
CBD_DECOMPRESSION = 2;
163
{ Flags for compression/decompression option }
164
CBD_COLOR_CONVERSION =$0000001;
166
{ Compression scheme in the ulCompression field of the bitmapinfo structure }
177
BRH_NOTHALFTONED = 0;
178
BRH_ERRORDIFFUSION = 1;
185
{ Values identifying bitmap types used in usType field
186
of BITMAPFILEHEADER(2) and BITMAPARRAYFILEHEADER(2).
187
(BFT_ => Bitmap File Type) }
191
BFT_COLORICON = $4943;
192
BFT_COLORPOINTER = $5043;
193
BFT_BITMAPARRAY = $4142;
195
{ type of picture to print }
199
{ type of conversion required }
203
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
204
var pszParams: PChar): Longbool; cdecl;
206
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
207
lType: longint): Longbool; cdecl;
212
function PicPrint (ahab: longint; var pszFilename: PChar; lType: longint;
213
var pszParams: PChar): Longbool; cdecl; external 'PMPIC' index 11;
215
function PicIchg (ahab: longint; var pszFilename1, pszFilename2: PChar;
216
lType: longint): Longbool; cdecl; external 'PMPIC' index 12;
220
$Log: pmbitmap.pas,v $
221
Revision 1.4 2002/11/02 11:16:38 hajny
222
+ PMPIC.DLL functions added
224
Revision 1.3 2002/09/07 16:01:25 peter
225
* old logs removed and tabs fixed