Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::images::io::BMPTranscoder Class Reference

A class that handles encoding and decoding image data to/from the windows bitmap format (.bmp) More...

#include <omImagesBMPTranscoder.h>

Inheritance diagram for om::images::io::BMPTranscoder:
om::images::io::ImageTranscoder om::resources::ResourceTypeTranscoder< Image > om::resources::ResourceTranscoder

Public Member Functions

virtual const ResourceFormatgetResourceFormat () const
 Return an object that represents the resource format that this transcoder can read and write. More...
 
virtual ImageFormat getImageFormat () const
 Return an object that represents the format that this transcoder can encode and decode. More...
 
virtual Bool canEncode (const Image &image) const
 Return whether or not the specified image can be encoded using this transcoder. More...
 
virtual Bool encode (const Image &image, DataOutputStream &stream, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0)) const
 Encode the specified image and send the output to the a data output stream. More...
 
virtual Bool canDecode (const UByte *inputData, Size inputDataSizeInBytes) const
 Return whether or not the specified image data can be decoded using this transcoder. More...
 
virtual Bool decode (DataInputStream &stream, Image &image, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0)) const
 Decode image data from the specified DataInputStream and return an image. More...
 
- Public Member Functions inherited from om::images::io::ImageTranscoder
virtual Bool encode (const ResourceID &identifier, const Image &image, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Save the specified image at the specified ID location. More...
 
virtual Bool canDecode (const ResourceID &identifier) const
 Return whether or not the specified identifier refers to a valid image format for this transcoder. More...
 
Bool decode (const UByte *inputData, Size inputDataSizeInBytes, Image &image, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0)) const
 Decode the data from the specified data pointer and return an image. More...
 
virtual Imagedecode (ResourceID &identifier, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Load the image pointed to by the specified identifier. More...
 
- Public Member Functions inherited from om::resources::ResourceTypeTranscoder< Image >
virtual const ResourceTypegetResourceType () const
 Return an object that represents the resource type that this transcoder can read and write. More...
 
virtual Bool canEncode (const Image &resource) const =0
 Return whether or not this transcoder is able to encode the specified resource. More...
 
virtual Bool encode (const ResourceID &identifier, const Image &resource, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))=0
 Save the specified resource object at the specified ID location. More...
 
- Public Member Functions inherited from om::resources::ResourceTranscoder
virtual ~ResourceTranscoder ()
 Destroy a resource transcoder and release all of its resources. More...
 

Detailed Description

A class that handles encoding and decoding image data to/from the windows bitmap format (.bmp)

Member Function Documentation

virtual const ResourceFormat& om::images::io::BMPTranscoder::getResourceFormat ( ) const
virtual

Return an object that represents the resource format that this transcoder can read and write.

Implements om::resources::ResourceTranscoder.

virtual ImageFormat om::images::io::BMPTranscoder::getImageFormat ( ) const
virtual

Return an object that represents the format that this transcoder can encode and decode.

Implements om::images::io::ImageTranscoder.

virtual Bool om::images::io::BMPTranscoder::canEncode ( const Image image) const
virtual

Return whether or not the specified image can be encoded using this transcoder.

If TRUE is returned, the image is in a format that is compatible with this transcoder. Otherwise, the image is not compatible and cannot be encoded.

Implements om::images::io::ImageTranscoder.

virtual Bool om::images::io::BMPTranscoder::encode ( const Image image,
DataOutputStream stream,
const ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
) const
virtual

Encode the specified image and send the output to the a data output stream.

If the encoding succeeds, the encoded image data is sent to the data output stream and TRUE is returned. Otherwise, FALSE is returned and no data is sent to the stream.

Implements om::images::io::ImageTranscoder.

virtual Bool om::images::io::BMPTranscoder::canDecode ( const UByte inputData,
Size  inputDataSizeInBytes 
) const
virtual

Return whether or not the specified image data can be decoded using this transcoder.

The transcoder examines the data and determines if the data contains a valid image in the transcoder's format. If so, TRUE is returned. Otherwise, FALSE is returned.

Implements om::images::io::ImageTranscoder.

virtual Bool om::images::io::BMPTranscoder::decode ( DataInputStream stream,
Image image,
ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
) const
virtual

Decode image data from the specified DataInputStream and return an image.

The image is returned in the output image reference.

If the decoding succeeds, the function creates an image and places it in the image output reference paramter and TRUE is returned. Otherwise, if the decoding fails, FALSE is returned.

Implements om::images::io::ImageTranscoder.


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