File: plbmpdec_8h-source.html

package info (click to toggle)
paintlib 2.6.2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,900 kB
  • ctags: 3,875
  • sloc: cpp: 25,209; sh: 10,600; ansic: 1,891; makefile: 119
file content (193 lines) | stat: -rw-r--r-- 11,802 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: plbmpdec.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a></div>
<h1>plbmpdec.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">|      $Id: plbmpdec_8h-source.html,v 1.4 2004/09/15 15:26:29 uzadow Exp $</span>
00005 <span class="comment">|</span>
00006 <span class="comment">|      Copyright (c) 1996-2002 Ulrich von Zadow</span>
00007 <span class="comment">|</span>
00008 <span class="comment">\--------------------------------------------------------------------</span>
00009 <span class="comment">*/</span>
00010 
00011 <span class="preprocessor">#ifndef INCL_PLBMPDEC</span>
00012 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLBMPDEC</span>
00013 <span class="preprocessor"></span>
00014 <span class="preprocessor">#ifndef INCL_PLPICDEC</span>
00015 <span class="preprocessor"></span><span class="preprocessor">#include "plpicdec.h"</span>
00016 <span class="preprocessor">#endif</span>
00017 <span class="preprocessor"></span>
00018 <span class="preprocessor">#ifndef INCL_PLWINDEFS</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="plwindefs_8h.html">plwindefs.h</a>"</span>
00020 <span class="preprocessor">#endif</span>
00021 <span class="preprocessor"></span><span class="comment"></span>
00022 <span class="comment">//! Windows bitmap file decoder. Decodes bitmap files (compressed and</span>
00023 <span class="comment">//! uncompressed) of all bit depths. Returns an 8</span>
00024 <span class="comment">//! or 32 bpp bitmap.</span>
<a name="l00025"></a><a class="code" href="classPLBmpDecoder.html">00025</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classPLBmpDecoder.html">PLBmpDecoder</a> : <span class="keyword">public</span> <a class="code" href="classPLPicDecoder.html">PLPicDecoder</a>
00026 {
00027 
00028 <span class="keyword">public</span>:<span class="comment"></span>
00029 <span class="comment">  //! Creates a decoder</span>
00030 <span class="comment"></span>  <a class="code" href="classPLBmpDecoder.html">PLBmpDecoder</a>
00031     ();
00032 <span class="comment"></span>
00033 <span class="comment">  //! Destroys a decoder</span>
00034 <span class="comment"></span>  <span class="keyword">virtual</span> ~<a class="code" href="classPLBmpDecoder.html">PLBmpDecoder</a>
00035     ();
00036 <span class="comment"></span>
00037 <span class="comment">  //! Opens the data source. </span>
00038 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLBmpDecoder.html#a2">Open</a> (<a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc);
00039 <span class="comment"></span>
00040 <span class="comment">  //! Fills the bitmap with the main image. </span>
00041 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLBmpDecoder.html#a3">GetImage</a> (<a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp; Bmp);
00042 <span class="comment"></span>
00043 <span class="comment">  //!</span>
00044 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> Close ();
00045 
00046 <span class="keyword">private</span>:
00047 
00048   <span class="comment">// Decodes the bitmap file &amp; info headers</span>
00049   WINBITMAPINFOHEADER * getInfoHeader
00050     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00051       <a class="code" href="classPLPixel32.html">PLPixel32</a>* Pal
00052     );
00053 
00054   <span class="comment">// Decodes a 2-color bitmap. Ignores the palette &amp; just uses</span>
00055   <span class="comment">// black &amp; white as 'colors'</span>
00056   <span class="keywordtype">void</span> decode1bpp
00057     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00058       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00059     );
00060 
00061   <span class="comment">// Decodes an uncompressed 16-color-bitmap.</span>
00062   <span class="keywordtype">void</span> decode4bpp
00063     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00064       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00065     );
00066 
00067   <span class="comment">// Decodes an uncompressed 256-color-bitmap.</span>
00068   <span class="keywordtype">void</span> decode8bpp
00069     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00070       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00071     );
00072 
00073   <span class="comment">// Decodes a compressed 16-color-bitmap.</span>
00074   <span class="keywordtype">void</span> decodeRLE4
00075     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00076       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00077     );
00078 
00079   <span class="comment">// Decodes a compressed 256-color-bitmap.</span>
00080   <span class="keywordtype">void</span> decodeRLE8
00081     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00082       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00083     );
00084 
00085   <span class="keywordtype">void</span> decodeHiColor
00086     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00087       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00088       WINBITMAPINFOHEADER * pBMI
00089     );
00090 
00091   <span class="comment">// Decodes true-color bitmap</span>
00092   <span class="keywordtype">void</span> decodeTrueColor
00093     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00094       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00095       <span class="keywordtype">int</span> SrcBPP
00096     );
00097 
00098   <span class="keywordtype">void</span> decode15bppLine
00099     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00100       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00101       PLBYTE * pDest
00102     );
00103 
00104   <span class="keywordtype">void</span> decode16bppLine
00105     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00106       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00107       PLBYTE * pDest
00108     );
00109 
00110   <span class="keywordtype">void</span> decode24bppLine
00111     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00112       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00113       PLBYTE * pDest
00114     );
00115 
00116   <span class="keywordtype">void</span> decode32bppLine
00117     ( <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00118       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00119       PLBYTE * pDest
00120     );
00121 
00122 
00123   <span class="comment">// Decodes two 4-bit pixels using a palette &amp; puts them in pDest</span>
00124   <span class="comment">// and pDest+4.</span>
00125   <span class="keywordtype">void</span> decode2Nibbles
00126     ( PLBYTE * pDest,
00127       PLBYTE SrcByte
00128     );
00129 
00130   <span class="comment">// Makes a private copy of the palette in the file and sets the</span>
00131   <span class="comment">// alpha channel. Returns the number of colors read.</span>
00132   <span class="keywordtype">int</span> readPalette
00133     ( WINBITMAPINFOHEADER * pBMI,     <span class="comment">// Pointer to bitmapinfoheader in file.</span>
00134       <a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc,
00135       <a class="code" href="classPLPixel32.html">PLPixel32</a> * pPal,
00136       <span class="keywordtype">int</span> RGBSize
00137     );
00138 
00139   <a class="code" href="classPLPixel32.html">PLPixel32</a> m_Pal[256];
00140   WINBITMAPINFOHEADER * m_pBMI;
00141 };
00142 
00143 <span class="preprocessor">#endif</span>
00144 <span class="preprocessor"></span><span class="comment">/*</span>
00145 <span class="comment">/--------------------------------------------------------------------</span>
00146 <span class="comment">|</span>
00147 <span class="comment">|      $Log: plbmpdec_8h-source.html,v $
00147 <span class="comment">|      Revision 1.4  2004/09/15 15:26:29  uzadow
00147 <span class="comment">|      Linux compatibility changes, doc update.
00147 <span class="comment">|</span>
00148 <span class="comment">|      Revision 1.9  2004/06/19 16:49:07  uzadow</span>
00149 <span class="comment">|      Changed GetImage so it works with PLBmpBase</span>
00150 <span class="comment">|</span>
00151 <span class="comment">|      Revision 1.8  2004/06/06 12:56:38  uzadow</span>
00152 <span class="comment">|      Doxygenified documentation.</span>
00153 <span class="comment">|</span>
00154 <span class="comment">|      Revision 1.7  2002/08/04 20:08:01  uzadow</span>
00155 <span class="comment">|      Added PLBmpInfo class, ability to extract metainformation from images without loading the whole image and proper greyscale support.</span>
00156 <span class="comment">|</span>
00157 <span class="comment">|      Revision 1.6  2002/03/31 13:36:41  uzadow</span>
00158 <span class="comment">|      Updated copyright.</span>
00159 <span class="comment">|</span>
00160 <span class="comment">|      Revision 1.5  2001/10/21 17:12:39  uzadow</span>
00161 <span class="comment">|      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.</span>
00162 <span class="comment">|</span>
00163 <span class="comment">|      Revision 1.4  2001/10/06 22:37:08  uzadow</span>
00164 <span class="comment">|      Linux compatibility.</span>
00165 <span class="comment">|</span>
00166 <span class="comment">|      Revision 1.3  2001/10/06 20:44:45  uzadow</span>
00167 <span class="comment">|      Linux compatibility</span>
00168 <span class="comment">|</span>
00169 <span class="comment">|      Revision 1.2  2001/10/05 21:15:09  uzadow</span>
00170 <span class="comment">|      Improved support for OS/2 bitmap decoding.</span>
00171 <span class="comment">|</span>
00172 <span class="comment">|      Revision 1.1  2001/09/16 19:03:22  uzadow</span>
00173 <span class="comment">|      Added global name prefix PL, changed most filenames.</span>
00174 <span class="comment">|</span>
00175 <span class="comment">|</span>
00176 <span class="comment">\--------------------------------------------------------------------</span>
00177 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>