MrSID Decode SDK for Raster Reference Manual
9.1.0.4045
|
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. More... | |
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. More... | |
LT_STATUS | setAddAlphaBand (bool addAlpha) |
If true, use the nodata pixel to build a alpha band. More... | |
LT_STATUS | setPaletteSize (lt_uint32 size) |
Will cause input buffer to have its colors quantized to the specified number of output colors. More... | |
LT_STATUS | write (const LTIScene &scene) |
LT_STATUS | writeBegin (const LTIScene &scene) |
LT_STATUS | writeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene) |
LT_STATUS | writeEnd () |
![]() | |
virtual | ~LTIGeoFileImageWriter () |
virtual LT_STATUS | deleteOutput (void) |
clean up a failed encode (write) operation More... | |
virtual LT_STATUS | setOutputFileSpec (const LTFileSpec &fileSpec) |
set output file name More... | |
virtual LT_STATUS | setOutputFileSpec (const char *fileSpec) |
set output file name More... | |
virtual LT_STATUS | setOutputStream (LTIOStreamInf *stream) |
set output file stream More... | |
virtual void | setWriteWorldFile (bool enabled) |
enable writing of world file More... | |
![]() | |
virtual | ~LTIImageWriter () |
LT_STATUS | setStripHeight (lt_uint32 stripHeight) |
set the stripheight for the encode More... | |
lt_uint32 | getStripHeight (void) const |
get the stripheight for the encode More... | |
virtual lt_uint32 | getDefaultStripHeight (void) const |
get the preferred stripheight for the encode More... | |
virtual lt_int64 | getEncodingCost (const LTIScene &scene) const |
get the cost to encode the scene More... | |
void | setProgressDelegate (LTIProgressDelegate *delegate) |
set progress delegate More... | |
void | setInterruptDelegate (LTIInterruptDelegate *delegate) |
set interrupt delegate More... | |
const LTIImageStage * | getSourceImageStage (void) const |
get the source image stage More... | |
LTIProgressDelegate * | getProgressDelegate (void) const |
get progress delegate More... | |
LTIInterruptDelegate * | getInterruptDelegate (void) const |
get interrupt delegate More... | |
virtual LT_STATUS | setEncodingApplication (const char *name, const char *version, const char *comment=NULL) |
set name and version of the creating application More... | |
Additional Inherited Members | |
![]() | |
LTIGeoFileImageWriter (bool supportsStreams) | |
constructor More... | |
LTIOStreamInf * | getStream () const |
get underlying stream More... | |
LTFileSpec * | getFileSpec () const |
get target filename More... | |
![]() | |
LTIImageStage * | m_image |
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).
Enumerator | |
---|---|
NoFilters | |
FilterNone | |
FilterSub | |
FilterUp | |
FilterAvg | |
FilterPaeth | |
FilterAll |
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) |
Reimplemented from LTIImageWriter.
Reimplemented from LTIGeoFileImageWriter.
|
virtual |
Reimplemented from LTIGeoFileImageWriter.
|
virtual |
Implements LTIGeoFileImageWriter.
LizardTech |