pmbitmap.pas 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {****************************************************************************
  2. $Id$
  3. Copyright (c) 1993,94 by Florian Klaempfl
  4. Copyright (c) 1999 by Ramon Bosque
  5. The Free Pascal runtime library is distributed under the Library GNU Public
  6. License v2. So is this unit. The Library GNU Public License requires you to
  7. distribute the source code of this unit with any product that uses it.
  8. Because the EMX library isn't under the LGPL, we grant you an exception to
  9. this, and that is, when you compile a program with the Free Pascal compiler,
  10. you do not need to ship source code with that program, AS LONG AS YOU ARE
  11. USING UNMODIFIED CODE! If you modify this code, you MUST change the next
  12. line:
  13. <This an official, unmodified FPK Pascal source code file.>
  14. Send us your modified files, we can work together if you want!
  15. FPK-Pascal 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. See the
  18. Library GNU General Public License for more details.
  19. You should have received a copy of the Library GNU General Public License
  20. along with Free Pascal; see the file COPYING.LIB. If not, write to
  21. the Free Software Foundation, 59 Temple Place - Suite 330,
  22. Boston, MA 02111-1307, USA.
  23. ****************************************************************************}
  24. unit pmbitmap;
  25. {Warning: This code is alfa. Future versions of this unit will propably
  26. not be compatible.}
  27. interface
  28. {$PACKRECORDS 1}
  29. type TBitmapInfoHeader=record
  30. cbFix:cardinal;
  31. cx:word;
  32. cy:word;
  33. cPlanes:word;
  34. cBitCount:word;
  35. end;
  36. PBitmapInfoHeader=^TBitmapInfoHeader;
  37. BitmapInfoHeader=TBitmapInfoHeader;
  38. TRgb=record
  39. bBlue,
  40. bGreen,
  41. bRed:byte;
  42. end;
  43. PRgb=^TRgb;
  44. Rgb=TRgb;
  45. TBitmapInfo=record
  46. cbFix:cardinal;
  47. cx:word;
  48. cy:word;
  49. cPlanes:word;
  50. cBitCount:word;
  51. aRgbColor:array[0..1-1] of TRgb;
  52. end;
  53. PBitmapInfo=^TBitmapInfo;
  54. BitmapInfo=TBitmapInfo;
  55. TBitmapInfoHeader2=record
  56. cbFix:cardinal;
  57. cx:cardinal;
  58. cy:cardinal;
  59. cPlanes:word;
  60. cBitCount:word;
  61. ulCompression:cardinal;
  62. cbImage:cardinal;
  63. cxResolution:cardinal;
  64. cyResolution:cardinal;
  65. cClrUsed:cardinal;
  66. cClrImportant:cardinal;
  67. usUnits:word;
  68. usReserved:word;
  69. usRecording:word;
  70. usRendering:word;
  71. cSize1:cardinal;
  72. cSize2:cardinal;
  73. ulColorEncoding:cardinal;
  74. ulIdentifier:cardinal;
  75. end;
  76. PBitmapInfoHeader2=^TBitmapInfoHeader2;
  77. BitmapInfoHeader2=TBitmapInfoHeader2;
  78. TRgb2=record
  79. bBlue,
  80. bGreen,
  81. bRed,
  82. fcOptions:byte;
  83. end;
  84. PRgb2=^TRgb2;
  85. Rgb2=TRgb2;
  86. TBitmapInfo2=record
  87. cbFix:cardinal;
  88. cx:cardinal;
  89. cy:cardinal;
  90. cPlanes:word;
  91. cBitCount:word;
  92. ulCompression:cardinal;
  93. cbImage:cardinal;
  94. cxResolution:cardinal;
  95. cyResolution:cardinal;
  96. cClrUsed:cardinal;
  97. cClrImportant:cardinal;
  98. usUnits:word;
  99. usReserved:word;
  100. usRecording:word;
  101. usRendering:word;
  102. cSize1:cardinal;
  103. cSize2:cardinal;
  104. ulColorEncoding:cardinal;
  105. ulIdentifier:cardinal;
  106. aRgbColor:array[0..1-1] of TRgb2;
  107. end;
  108. PBitmapInfo2=^TBitmapInfo2;
  109. BitmapInfo2=TBitmapInfo2;
  110. TBitmapFileHeader=record
  111. usType:word;
  112. cbSize:cardinal;
  113. xHotspot:integer;
  114. yHotspot:integer;
  115. offBits:cardinal;
  116. bmp:TBitmapInfoHeader;
  117. end;
  118. PBitmapFileHeader=^TBitmapFileHeader;
  119. BitmapFileHeader=TBitmapFileHeader;
  120. TBitmapArrayFileHeader=record
  121. usType:word;
  122. cbSize:cardinal;
  123. offNext:cardinal;
  124. cxDisplay:word;
  125. cyDisplay:word;
  126. bfh:TBitmapFileHeader;
  127. end;
  128. PBitmapArrayFileHeader=^TBitmapArrayFileHeader;
  129. BitmapArrayFileHeader=TBitmapArrayFileHeader;
  130. TBitmapFileHeader2=record
  131. usType:word;
  132. cbSize:cardinal;
  133. xHotspot:integer;
  134. yHotspot:integer;
  135. offBits:cardinal;
  136. bmp2:TBitmapInfoHeader2;
  137. end;
  138. PBitmapFileHeader2=^TBitmapFileHeader2;
  139. BitmapFileHeader2=TBitmapFileHeader2;
  140. TBitmapArrayFileHeader2=record
  141. usType:word;
  142. cbSize:cardinal;
  143. offNext:cardinal;
  144. cxDisplay:word;
  145. cyDisplay:word;
  146. bfh2:TBitmapFileHeader2;
  147. end;
  148. PBitmapArrayFileHeader2=^TBitmapArrayFileHeader2;
  149. BitmapArrayFileHeader2=^BitmapArrayFileHeader2;
  150. const CBD_COMPRESSION = 1;
  151. CBD_DECOMPRESSION = 2;
  152. CBD_BITS = 0;
  153. CBD_COLOR_CONVERSION =$0000001;
  154. BCA_UNCOMP = 0;
  155. BCA_HUFFMAN1D = 3;
  156. BCA_RLE4 = 2;
  157. BCA_RLE8 = 1;
  158. BCA_RLE24 = 4;
  159. BRU_METRIC = 0;
  160. BRA_BOTTOMUP = 0;
  161. BRH_NOTHALFTONED = 0;
  162. BRH_ERRORDIFFUSION = 1;
  163. BRH_PANDA = 2;
  164. BRH_SUPERCIRCLE = 3;
  165. BCE_PALETTE = (-1);
  166. BCE_RGB = 0;
  167. BFT_ICON = $4349;
  168. BFT_BMAP = $4d42;
  169. BFT_POINTER = $5450;
  170. BFT_COLORICON = $4943;
  171. BFT_COLORPOINTER = $5043;
  172. BFT_BITMAPARRAY = $4142;
  173. implementation
  174. end.
  175. {
  176. $Log$
  177. Revision 1.5 1999-08-04 15:51:10 hajny
  178. * merging changes by RB and DM :-(
  179. Revision 1.4 1999/06/11 13:16:21 daniel
  180. * Layout and copyright updates.
  181. Revision 1.3 1999/06/02 16:01:31 hajny
  182. * changes by Ramon Bosque
  183. }