MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

PNGImageWriter.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2005 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12
13 #ifndef PNGIMAGEWRITER_H
14 #define PNGIMAGEWRITER_H
15
16 // lt_lib_mrsid_core
17 #include "lti_geoFileImageWriter.h"
18
19 #if defined(LT_COMPILER_MS)
20 #pragma warning(push,4)
21 #endif
22
23 struct png_struct_def;
24 struct png_info_struct;
25 struct png_color_struct;
26
27 LT_BEGIN_NAMESPACE(LizardTech)
28
29 class LTFileSpec;
30
36 class PNGImageWriter : public LTIGeoFileImageWriter
37 {
38 LT_DISALLOW_COPY_CONSTRUCTOR(PNGImageWriter);
39 public:
40 PNGImageWriter(void);
41 ~PNGImageWriter(void);
42
43 LT_STATUS initialize(LTIImageStage *imageStage);
44
45
56 void setCompressionLevel( lt_int16 level );
57
66 enum ScanlineFilter {
67 NoFilters = 0x00,
68 FilterNone = 0x08,
69 FilterSub = 0x10,
70 FilterUp = 0x20,
71 FilterAvg = 0x40,
72 FilterPaeth = 0x80,
73 FilterAll = 0xf8,
74 };
75 void setScanlineFilter(ScanlineFilter filters);
76
83 LT_STATUS setWriteTransparencyColor(bool write);
84
89 LT_STATUS setAddAlphaBand(bool addAlpha);
90
101 LT_STATUS setPaletteSize(lt_uint32 size);
102
107 LT_STATUS write(const LTIScene &scene);
109
114 LT_STATUS writeBegin(const LTIScene& scene);
115 LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
116 LT_STATUS writeEnd();
118
119 private:
120 LT_STATUS checkImpedance() const;
121
122 struct png_struct_def *m_png;
123 struct png_info_struct *m_info;
124 struct png_color_struct *m_pct;
125 lt_int32 m_pctsize;
126
127 bool m_writeTransparencyColor;
128 bool m_addAlphaBand;
129 lt_uint32 m_paletteSize;
130 lt_int16 m_compressionLevel;
131 ScanlineFilter m_scanlineFilters;
132
133 char *m_errorMessage;
134 };
135
136
137 LT_END_NAMESPACE(LizardTech)
138
139 #if defined(LT_COMPILER_MS)
140 #pragma warning(pop)
141 #endif
142
143 #endif // PNGIMAGEWRITER_H

LizardTech