File: pltiffdec_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 (155 lines) | stat: -rw-r--r-- 10,318 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
<!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: pltiffdec.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>pltiffdec.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: pltiffdec_8h-source.html,v 1.4 2004/09/15 15:26:32 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_PLTIFFDEC</span>
00012 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLTIFFDEC</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_PLPOINT</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#include "plpoint.h"</span>
00020 <span class="preprocessor">#endif</span>
00021 <span class="preprocessor"></span>
00022 <span class="keyword">extern</span> <span class="stringliteral">"C"</span>
00023 {
00024 <span class="preprocessor">#include "tiff.h"</span>
00025 <span class="preprocessor">#include "tiffio.h"</span>
00026 }
00027 <span class="comment"></span>
00028 <span class="comment">//! TIFF file decoder. Uses LIBTIFF to do the actual conversion.</span>
00029 <span class="comment">//! Supports 1, 8, 24 and 32 bits per pixel as output formats.</span>
<a name="l00030"></a><a class="code" href="classPLTIFFDecoder.html">00030</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classPLTIFFDecoder.html">PLTIFFDecoder</a> : <span class="keyword">public</span> <a class="code" href="classPLPicDecoder.html">PLPicDecoder</a>
00031 {
00032 
00033 <span class="keyword">friend</span> <span class="keyword">class </span>_tiff_helper;
00034 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPLTIFFEncoder.html">PLTIFFEncoder</a>;
00035 
00036 <span class="keyword">public</span>:<span class="comment"></span>
00037 <span class="comment">  //! Creates a decoder</span>
00038 <span class="comment"></span>  <a class="code" href="classPLTIFFDecoder.html">PLTIFFDecoder</a>
00039     ();
00040 <span class="comment"></span>
00041 <span class="comment">  //! Destroys a decoder</span>
00042 <span class="comment"></span>  <span class="keyword">virtual</span> ~<a class="code" href="classPLTIFFDecoder.html">PLTIFFDecoder</a>
00043     ();
00044 <span class="comment"></span>
00045 <span class="comment">  //!</span>
00046 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> Open (<a class="code" href="classPLDataSource.html">PLDataSource</a> * pDataSrc);
00047 <span class="comment"></span>
00048 <span class="comment">  //! Fills the bitmap with the image. </span>
00049 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLTIFFDecoder.html#a3">GetImage</a> (<a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp; Bmp);
00050 <span class="comment"></span>
00051 <span class="comment">  //!</span>
00052 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> Close ();
00053 
00054   <span class="keywordtype">int</span> GetField( <span class="keywordtype">int</span> tag_id, ... );<span class="comment"></span>
00055 <span class="comment">  //! this is this first argument to most libtiff's routines</span>
00056 <span class="comment">  //! use at your own risk; you've been warned!</span>
<a name="l00057"></a><a class="code" href="classPLTIFFDecoder.html#a6">00057</a> <span class="comment"></span>  TIFF* <a class="code" href="classPLTIFFDecoder.html#a6">GetTIFFHandle</a>() { <span class="keywordflow">return</span> m_pTif; }
00058 
00059 <span class="keyword">private</span>:
00060         <span class="comment">// these 2 helpers dedicated to hi/low bit-depths respectively</span>
00061         <span class="keywordtype">void</span> doHiColor
00062     ( TIFF * tif,
00063       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp,
00064       uint16 SamplePerPixel
00065     );
00066 
00067         <span class="keywordtype">void</span> doLoColor
00068     ( TIFF * tif,
00069       <a class="code" href="classPLBmpBase.html">PLBmpBase</a> * pBmp
00070     );
00071 
00072   <span class="keyword">const</span> <a class="code" href="classPLPoint.html">PLPoint</a> getResolution (TIFF* tif);
00073 
00074   <span class="comment">// Callback from the TIFF library.</span>
00075   <span class="comment">// Should be accessed only by the TIFF decoder and libtiff.</span>
00076   <span class="keyword">static</span> <span class="keywordtype">void</span> Win32WarningHandler
00077     ( <span class="keyword">const</span> <span class="keywordtype">char</span>* module,
00078       <span class="keyword">const</span> <span class="keywordtype">char</span>* fmt,
00079       va_list ap
00080     );
00081 
00082   <span class="comment">// Callback from the TIFF library.</span>
00083   <span class="comment">// Should be accessed only by the TIFF decoder and libtiff.</span>
00084   <span class="keyword">static</span> <span class="keywordtype">void</span> Win32ErrorHandler
00085     ( <span class="keyword">const</span> <span class="keywordtype">char</span>* module,
00086       <span class="keyword">const</span> <span class="keywordtype">char</span>* fmt,
00087       va_list ap
00088     );
00089 
00090 <span class="keyword">private</span>:
00091   <span class="comment">// Temporary storage for an error message. </span>
00092   <span class="comment">// Used in the callbacks, so it's static.</span>
00093   <span class="keyword">static</span> <span class="keywordtype">char</span> m_szLastErr[256];
00094 
00095   TIFF* m_pTif;
00096 };
00097 
00098 
00099 <span class="preprocessor">#endif</span>
00100 <span class="preprocessor"></span><span class="comment">/*</span>
00101 <span class="comment">/--------------------------------------------------------------------</span>
00102 <span class="comment">|</span>
00103 <span class="comment">|      $Log: pltiffdec_8h-source.html,v $
00103 <span class="comment">|      Revision 1.4  2004/09/15 15:26:32  uzadow
00103 <span class="comment">|      Linux compatibility changes, doc update.
00103 <span class="comment">|</span>
00104 <span class="comment">|      Revision 1.7  2004/06/19 16:49:07  uzadow</span>
00105 <span class="comment">|      Changed GetImage so it works with PLBmpBase</span>
00106 <span class="comment">|</span>
00107 <span class="comment">|      Revision 1.6  2004/06/06 12:56:38  uzadow</span>
00108 <span class="comment">|      Doxygenified documentation.</span>
00109 <span class="comment">|</span>
00110 <span class="comment">|      Revision 1.5  2002/08/04 20:08:01  uzadow</span>
00111 <span class="comment">|      Added PLBmpInfo class, ability to extract metainformation from images without loading the whole image and proper greyscale support.</span>
00112 <span class="comment">|</span>
00113 <span class="comment">|      Revision 1.4  2002/03/31 13:36:42  uzadow</span>
00114 <span class="comment">|      Updated copyright.</span>
00115 <span class="comment">|</span>
00116 <span class="comment">|      Revision 1.3  2001/10/21 17:12:40  uzadow</span>
00117 <span class="comment">|      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.</span>
00118 <span class="comment">|</span>
00119 <span class="comment">|      Revision 1.2  2001/10/17 13:19:47  uzadow</span>
00120 <span class="comment">|      Added support for photoshop tiff alpha channels.</span>
00121 <span class="comment">|</span>
00122 <span class="comment">|      Revision 1.1  2001/09/16 19:03:22  uzadow</span>
00123 <span class="comment">|      Added global name prefix PL, changed most filenames.</span>
00124 <span class="comment">|</span>
00125 <span class="comment">|      Revision 1.7  2000/12/18 22:42:52  uzadow</span>
00126 <span class="comment">|      Replaced RGBAPIXEL with PLPixel32.</span>
00127 <span class="comment">|</span>
00128 <span class="comment">|      Revision 1.6  2000/01/16 20:43:15  anonymous</span>
00129 <span class="comment">|      Removed MFC dependencies</span>
00130 <span class="comment">|</span>
00131 <span class="comment">|      Revision 1.5  2000/01/08 15:56:12  Ulrich von Zadow</span>
00132 <span class="comment">|      Made sure change logging works in every file.</span>
00133 <span class="comment">|</span>
00134 <span class="comment">|      Revision 1.4  1999/10/03 18:50:52  Ulrich von Zadow</span>
00135 <span class="comment">|      Added automatic logging of changes.</span>
00136 <span class="comment">|</span>
00137 <span class="comment">|</span>
00138 <span class="comment">--------------------------------------------------------------------</span>
00139 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:41 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>