Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Bitmap streamer class. More...
#include <ilviews/bitmaps/png.h>
Public Member Functions | |
IlvPNGStreamer () | |
Constructor. | |
IlBoolean | canRead () const |
Indicates that the instance can read from a stream. More... | |
IlBoolean | canWrite () const |
Indicates that the instance can write to a stream. More... | |
IlBoolean | checkSignature (const IlUChar *data, IlUInt size) |
Checks the signature of the input stream. More... | |
IlUInt | getAlphaLevel () const |
Gets the alpha level of the PNG streamer. More... | |
IlUInt | getCompressionLevel () const |
Gets the compression level of the generated PNG stream. More... | |
IlUShort | getIndexedColors () const |
Returns the number of colors to quantize to. More... | |
IlBoolean | hasInterlace () const |
Gets whether the generated PNG stream is interlaced. More... | |
IlBoolean | isIndexed () const |
IlvBitmapData * | read (IL_STDPREF istream &stream) |
Reads a PNG image from a stream. More... | |
void | setAlphaLevel (IlUInt level) |
Sets the alpha level for the PNG stream. More... | |
void | setCompressionLevel (IlUInt level) |
Sets the compression level of the generated PNG stream. More... | |
void | setIndexed (IlBoolean indexed, IlUShort numcols=256) |
Sets whether the generated PNG stream is indexed. More... | |
void | setInterlace (IlBoolean interlace) |
Sets whether the generated PNG stream is interlaced. More... | |
IlBoolean | write (IlvBitmapData *data, IL_STDPREF ostream &stream) |
Writes an IlvBitmapData to a PNG stream. More... | |
Public Member Functions inherited from IlvBitmapStreamer | |
virtual void | callReadProgressCallback (IlUInt current, IlUInt max) |
Calls the callback for read progression. More... | |
virtual void | callWriteProgressCallback (IlUInt current, IlUInt max) |
Calls the callback for write progression. More... | |
virtual const char * | getName () const |
Returns the internal name of the streamer. More... | |
IlvQuantizer * | getQuantizer () const |
Returns the quantizer used by this streamer. More... | |
virtual IlvBitmapInformation * | readInfo (IL_STDPREF istream &stream) |
Reads information from a stream. More... | |
void | setQuantizer (IlvQuantizer *quantizer) |
Sets the quantizer used (if needed) by this streamer. More... | |
virtual void | setReadProgressCallback (IlvProgressCallback rCallback, IlAny arg=0) |
Sets the callback for read progression. More... | |
virtual void | setWriteProgressCallback (IlvProgressCallback wCallback, IlAny arg=0) |
Sets the callback for write progression. More... | |
virtual | ~IlvBitmapStreamer () |
Reads a bitmap using the registered streamers. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvBitmapStreamer | |
static void | Register (IlvBitmapStreamer *streamer) |
Registers the given streamer. More... | |
static IlBoolean | UnRegister (IlvBitmapStreamer *streamer) |
Unregisters the given streamer. More... | |
static IlvBitmapStreamer * | Get (const char *name) |
Reads a bitmap using the registered streamers. More... | |
static IlvBitmap * | Read (IlvDisplay *display, IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads a bitmap using the registered streamers. More... | |
static IlvBitmapData * | ReadBitmapData (IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads bitmap data using the registered streamers. More... | |
static IlvBitmapInformation * | ReadInfo (IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads bitmap information using the registered streamers. More... | |
static IlvBitmapStreamer ** | GetRegisteredStreamers (IlUInt &count) |
Returns the registered streamers. More... | |
static IlBoolean | CheckInModules (const IlUChar *sigbuffer, const IlUChar *filename=0) |
Reads a bitmap using the registered streamers. More... | |
static | IlListOf (IlvBitmapStreamers)*_Streamers |
Reads a bitmap using the registered streamers. More... | |
Protected Member Functions inherited from IlvBitmapStreamer | |
IlvBitmapStreamer () | |
Reads a bitmap using the registered streamers. More... | |
Protected Attributes inherited from IlvBitmapStreamer | |
IlvProgressCallback | _readProgressCallback |
Reads a bitmap using the registered streamers. More... | |
IlAny | _argr |
Reads a bitmap using the registered streamers. More... | |
IlvProgressCallback | _writeProgressCallback |
Reads a bitmap using the registered streamers. More... | |
IlAny | _argw |
Reads a bitmap using the registered streamers. More... | |
IlvQuantizer * | _quantizer |
Reads a bitmap using the registered streamers. More... | |
Bitmap streamer class.
Library: display
This streamer provides methods to deal with a stream containing a PNG image. It supports reading from all PNG streams. It handles transparent images by mapping alpha values greater than 50 to opaque and others to transparent.
This streamer can read and write.
When writing, it is possible to force indexed output using a specified number of colors. When reading or writing interlaced images, callbacks will be called at each pass. When reading or writing non-interlaced images, callbacks will be called at each scanline.
|
virtual |
Indicates that the instance can read from a stream.
IlTrue
. Reimplemented from IlvBitmapStreamer.
|
virtual |
Indicates that the instance can write to a stream.
IlTrue
. Reimplemented from IlvBitmapStreamer.
Checks the signature of the input stream.
data | The data containing the signature of the stream. |
size | The size of the data containing the signature. |
IlTrue
if the data contains a PNG signature. Implements IlvBitmapStreamer.
IlUInt IlvPNGStreamer::getAlphaLevel | ( | ) | const |
Gets the alpha level of the PNG streamer.
IlUInt IlvPNGStreamer::getCompressionLevel | ( | ) | const |
Gets the compression level of the generated PNG stream.
IlUShort IlvPNGStreamer::getIndexedColors | ( | ) | const |
Returns the number of colors to quantize to.
IlBoolean IlvPNGStreamer::hasInterlace | ( | ) | const |
Gets whether the generated PNG stream is interlaced.
IlTrue
if the generated PNG stream is interlaced. IlBoolean IlvPNGStreamer::isIndexed | ( | ) | const |
Gets whether the generated PNG stream is indexed .
IlTrue
if the generated PNG stream is indexed.
|
virtual |
Reads a PNG image from a stream.
stream | The stream to read from. |
IlvBitmapData
. Reimplemented from IlvBitmapStreamer.
void IlvPNGStreamer::setAlphaLevel | ( | IlUInt | level | ) |
Sets the alpha level for the PNG stream.
Alpha levels greater than the given argument are converted to a fully opaque value while alpha levels smaller than the given argument are converted to a fully transparent value.
level | The alpha level. |
void IlvPNGStreamer::setCompressionLevel | ( | IlUInt | level | ) |
Sets the compression level of the generated PNG stream.
level | The compression level:
|
Sets whether the generated PNG stream is indexed.
indexed | IlTrue if the stream is generated in indexed mode. |
numcols | The number of desired colors if quantization is performed. |
void IlvPNGStreamer::setInterlace | ( | IlBoolean | interlace | ) |
Sets whether the generated PNG stream is interlaced.
interlace | IlTrue if the stream is interlaced. |
|
virtual |
Writes an IlvBitmapData
to a PNG stream.
data | The bitmap data to write. |
stream | The stream to write to. |
IlTrue
if the bitmap data has been written. Reimplemented from IlvBitmapStreamer.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.