MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
writes an image stage to a PNG file More...
#include <PNGImageWriter.h>
Public Types | |
enum | ScanlineFilter { NoFilters = 0x00, FilterNone = 0x08, FilterSub = 0x10, FilterUp = 0x20, FilterAvg = 0x40, FilterPaeth = 0x80, FilterAll = 0xf8 } |
Set the compression filter method. More... | |
Public Member Functions | |
PNGImageWriter (void) | |
~PNGImageWriter (void) | |
LT_STATUS | initialize (LTIImageStage *imageStage) |
void | setCompressionLevel (lt_int16 level) |
Set the library compression level. | |
void | setScanlineFilter (ScanlineFilter filters) |
LT_STATUS | setWriteTransparencyColor (bool write) |
If true, and the image has a transparency/nodata value, then this pixel value will be flagged as such in the PNG output image. | |
LT_STATUS | setAddAlphaBand (bool addAlpha) |
If true, use the nodata pixel to build a alpha band. | |
LT_STATUS | setPaletteSize (lt_uint32 size) |
Will cause input buffer to have its colors quantized to the specified number of output colors. | |
LT_STATUS | write (const LTIScene &scene) |
LT_STATUS | writeBegin (const LTIScene &scene) |
LT_STATUS | writeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene) |
LT_STATUS | writeEnd () |
This class writes an image stage to a PNG file.
Definition at line 36 of file PNGImageWriter.h.
These filters process each scanline to prepare it for optimal compression. Valid values are as enumerated by the ScanlineFilter type, corresponding directly to filters defined in the PNG spec. Specifying more than one filter (by bitwise OR) will cause libpng to select the best-performing filter on a scanline-by- scanline basis (by trying them).
Definition at line 66 of file PNGImageWriter.h.
PNGImageWriter::PNGImageWriter | ( | void | ) |
PNGImageWriter::~PNGImageWriter | ( | void | ) |
LT_STATUS PNGImageWriter::initialize | ( | LTIImageStage * | imageStage | ) |
LT_STATUS PNGImageWriter::setAddAlphaBand | ( | bool | addAlpha | ) |
void PNGImageWriter::setCompressionLevel | ( | lt_int16 | level | ) |
Currently, valid values range from 0 - 9, corresponding directly to the zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" compression). Note that tests have shown that zlib compression levels 3-6 usually perform as well as level 9 for PNG images, and do considerably fewer caclulations. In the future, these values may not correspond directly to the zlib compression levels.
If the palette size is 256 or less, the output PNG will be a natively palettized image. Sizes greater than 256 will simply quantize the input colors to enhance its compressibility.
void PNGImageWriter::setScanlineFilter | ( | ScanlineFilter | filters | ) |
LT_STATUS PNGImageWriter::setWriteTransparencyColor | ( | bool | write | ) |
LT_STATUS PNGImageWriter::write | ( | const LTIScene & | scene | ) | [virtual] |
Reimplemented from LTIImageWriter.
LT_STATUS PNGImageWriter::writeBegin | ( | const LTIScene & | scene | ) | [virtual] |
Reimplemented from LTIGeoFileImageWriter.
LT_STATUS PNGImageWriter::writeEnd | ( | ) | [virtual] |
Reimplemented from LTIGeoFileImageWriter.
LT_STATUS PNGImageWriter::writeStrip | ( | LTISceneBuffer & | stripBuffer, |
const LTIScene & | stripScene | ||
) | [virtual] |
Implements LTIGeoFileImageWriter.