rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvJPGStreamer Class Reference

Bitmap streamer class. More...

#include <ilviews/bitmaps/jpg.h>

Inheritance diagram for IlvJPGStreamer:
IlvBitmapStreamer

Public Member Functions

 IlvJPGStreamer ()
 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 getQuality () const
 Gets the quality of the generated JPEG stream when writing. More...
 
IlBoolean isProgressive () const
 Gets whether the generated JPEG stream is progressive. More...
 
IlvBitmapDataread (ILVSTDPREF istream &stream)
 Reads a JPEG image from a stream. More...
 
void setProgressive (IlBoolean progressive)
 Sets whether the generated JPEG stream is progressive. More...
 
void setQuality (IlUInt quality)
 Sets the quality of the generated JPEG stream. More...
 
IlBoolean write (IlvBitmapData *data, ILVSTDPREF ostream &stream)
 Writes an IlvBitmapDatato a JPEG 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...
 
IlvQuantizergetQuantizer () const
 Returns the quantizer used by this streamer. More...
 
virtual IlvBitmapDataread (IL_STDPREF istream &stream)
 Reads from a stream. More...
 
virtual IlvBitmapInformationreadInfo (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 IlBoolean write (IlvBitmapData *bitmapData, IL_STDPREF ostream &stream)
 Writes an IlvBitmapData to a stream. 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 IlvBitmapStreamerGet (const char *name)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapRead (IlvDisplay *display, IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapDataReadBitmapData (IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap data using the registered streamers. More...
 
static IlvBitmapInformationReadInfo (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...
 

Detailed Description

Bitmap streamer class.

Library: display

This streamer provides methods to deal with a stream containing a JPEG image. It supports reading from grayscale or true color and progressive and non-progressive JPEG streams.
This streamer can read and write.
When reading or writing, callbacks will be called at each scanline.

Member Function Documentation

IlBoolean IlvJPGStreamer::canRead ( ) const
virtual

Indicates that the instance can read from a stream.

Returns
IlTrue.

Reimplemented from IlvBitmapStreamer.

IlBoolean IlvJPGStreamer::canWrite ( ) const
virtual

Indicates that the instance can write to a stream.

Returns
IlTrue.

Reimplemented from IlvBitmapStreamer.

IlBoolean IlvJPGStreamer::checkSignature ( const IlUChar data,
IlUInt  size 
)
virtual

Checks the signature of the input stream.

Parameters
dataThe data containing the signature of the stream.
sizeThe size of the data containing the signature.
Returns
IlTrue if the data contains a JPEG signature.

Implements IlvBitmapStreamer.

IlUInt IlvJPGStreamer::getQuality ( ) const

Gets the quality of the generated JPEG stream when writing.

Returns
The quality of the JPEG stream.
IlBoolean IlvJPGStreamer::isProgressive ( ) const

Gets whether the generated JPEG stream is progressive.

Returns
IlTrue if the generated JPEG stream is progressive.
IlvBitmapData* IlvJPGStreamer::read ( ILVSTDPREF istream &  stream)

Reads a JPEG image from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmapData.
void IlvJPGStreamer::setProgressive ( IlBoolean  progressive)

Sets whether the generated JPEG stream is progressive.

Parameters
progressiveIlTrue if the stream is progressive.
void IlvJPGStreamer::setQuality ( IlUInt  quality)

Sets the quality of the generated JPEG stream.

This method sets the quality of the JPEG stream when writing. Useful values range from 10 (very low quality) to 100 (maximum quality).

Parameters
qualityThe quality of the JPEG stream.
IlBoolean IlvJPGStreamer::write ( IlvBitmapData data,
ILVSTDPREF ostream &  stream 
)

Writes an IlvBitmapDatato a JPEG stream.

Parameters
dataThe bitmap data to write.
streamThe stream to write to.
Returns
IlTrue if the bitmap data has been written.

© 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.