MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
PNGImageWriter.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef PNGIMAGEWRITER_H
9 #define PNGIMAGEWRITER_H
10 
11 // lt_lib_mrsid_core
12 #include "lti_geoFileImageWriter.h"
13 
14 struct png_struct_def;
15 struct png_info_struct;
16 struct png_color_struct;
17 
18 LT_BEGIN_LIZARDTECH_NAMESPACE
19 
20 class LTFileSpec;
21 
28 {
29  LT_DISALLOW_COPY_CONSTRUCTOR(PNGImageWriter);
30 public:
33 
35 
36 
48 
58  NoFilters = 0x00,
59  FilterNone = 0x08,
60  FilterSub = 0x10,
61  FilterUp = 0x20,
62  FilterAvg = 0x40,
63  FilterPaeth = 0x80,
64  FilterAll = 0xf8,
65  };
67 
75 
80  LT_STATUS setAddAlphaBand(bool addAlpha);
81 
93 
98  LT_STATUS write(const LTIScene &scene);
100 
106  LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
109 
110 private:
111  LT_STATUS checkImpedance() const;
112 
113  struct png_struct_def *m_png;
114  struct png_info_struct *m_info;
115  struct png_color_struct *m_pct;
116  lt_int32 m_pctsize;
117 
118  bool m_writeTransparencyColor;
119  bool m_addAlphaBand;
120  lt_uint32 m_paletteSize;
121  lt_int16 m_compressionLevel;
122  ScanlineFilter m_scanlineFilters;
123 
124  char *m_errorMessage;
125 };
126 
127 
128 LT_END_LIZARDTECH_NAMESPACE
129 
130 #endif // PNGIMAGEWRITER_H
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
signed short lt_int16
signed 16-bit integer
Definition: lt_types.h:38
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:42
Represents a file or directory path.
Definition: lt_fileSpec.h:35
class for writing geographic images to files or streams
abstract class for decoding from an image
representation of a scene
Definition: lti_scene.h:60
class to hold data passed between image stages
writes an image stage to a PNG file
PNGImageWriter(void)
LT_STATUS writeBegin(const LTIScene &scene)
void setScanlineFilter(ScanlineFilter filters)
LT_STATUS write(const LTIScene &scene)
LT_STATUS setAddAlphaBand(bool addAlpha)
If true, use the nodata pixel to build a alpha band.
LT_STATUS initialize(LTIImageStage *imageStage)
LT_STATUS writeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
encode one strip of the scene
ScanlineFilter
Set the compression filter method.
LT_STATUS writeEnd()
complete an encode (write) operation
void setCompressionLevel(lt_int16 level)
Set the library compression level.
LT_STATUS setPaletteSize(lt_uint32 size)
Will cause input buffer to have its colors quantized to the specified number of output colors.
LT_STATUS setWriteTransparencyColor(bool write)
If true, and the image has a transparency/nodata value, then this pixel value will be flagged as such...
~PNGImageWriter(void)

Extensis