MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
PNGImageWriter Class Reference

writes an image stage to a PNG file More...

#include <PNGImageWriter.h>

Inheritance diagram for PNGImageWriter:
LTIGeoFileImageWriter LTIImageWriter

List of all members.

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 ()

Detailed Description

This class writes an image stage to a PNG file.

Definition at line 36 of file PNGImageWriter.h.


Member Enumeration Documentation

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.


Constructor & Destructor Documentation


Member Function Documentation

Note:
- call this before writing the image, after initialize()

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.

Note:
- call this before writing the image, after initialize()
- default is no compression (0)

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.

Note:
- call this before writing the image, after initialize()
- the default palette size is 0, indicating that the colors will be left unquantized (true color)
Note:
- call this before writing the image, after initialize()
LT_STATUS PNGImageWriter::write ( const LTIScene scene) [virtual]
See also:
LTIImageWriter

Reimplemented from LTIImageWriter.

LT_STATUS PNGImageWriter::writeBegin ( const LTIScene scene) [virtual]
See also:
LTIGeoFileImageWriter

Reimplemented from LTIGeoFileImageWriter.

LT_STATUS PNGImageWriter::writeStrip ( LTISceneBuffer stripBuffer,
const LTIScene stripScene 
) [virtual]

The documentation for this class was generated from the following file: