Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::PNGCodec Class Reference

ImageCodec specialized in Portable Network Graphics images. More...

#include <OgrePNGCodec.h>

Inheritance diagram for Ogre::PNGCodec:

Ogre::ImageCodec Ogre::Codec List of all members.

Public Methods

void code (const DataChunk &input, DataChunk *output,...) const
 Codes the data in the input chunk and saves the result in the output chunk. More...

CodecData * decode (const DataChunk &input, DataChunk *output,...) const
 Codes the data from the input chunk into the output chunk. More...

String getType () const
 Returns the type of the codec as a String. More...

void codeToFile (const DataChunk &input, const String &outFileName, CodecData *pData) const
 Encodes data to a file. More...


Static Public Methods

void registerCodec (Codec *pCodec)
 Registers a new codec in the database. More...

CodecgetCodec (const String &extension)
 Gets the codec registered for the passed in file extension. More...


Protected Types

typedef std::map< String,
Codec * > 
CodecList

Static Protected Attributes

bool _is_initialized = false
CodecList ms_mapCodecs
 A map that contains all the registered codecs. More...


Detailed Description

ImageCodec specialized in Portable Network Graphics images.


Member Typedef Documentation

typedef std::map< String, Codec* > Ogre::Codec::CodecList [protected, inherited]
 


Member Function Documentation

void Ogre::PNGCodec::code const DataChunk   input,
DataChunk   output,
...   
const [virtual]
 

Codes the data in the input chunk and saves the result in the output chunk.

Note:
Has a variable number of arguments, which depend on the codec type.

Implements Ogre::ImageCodec.

void Ogre::ImageCodec::codeToFile const DataChunk   input,
const String   outFileName,
CodecData *    pData
const [virtual, inherited]
 

Encodes data to a file.

Parameters:
input  Chunk containing data to write
outFileName  Filename to output to (extension implies type)
pData  ImageData pointer

Implements Ogre::Codec.

Codec::CodecData * Ogre::PNGCodec::decode const DataChunk   input,
DataChunk   output,
...   
const [virtual]
 

Codes the data from the input chunk into the output chunk.

Remarks:
The returned CodecData pointer is a pointer to a class that holds information about the decoded buffer. For an image, this would be the size, the bitdepht, etc.
Note:
Has a variable number of arguments, which depend on the codec type.

Implements Ogre::ImageCodec.

Codec * Ogre::Codec::getCodec const String   extension [static, inherited]
 

Gets the codec registered for the passed in file extension.

String Ogre::PNGCodec::getType   const [inline, virtual]
 

Returns the type of the codec as a String.

Implements Ogre::ImageCodec.

void Ogre::Codec::registerCodec Codec   pCodec [inline, static, inherited]
 

Registers a new codec in the database.


Member Data Documentation

bool Ogre::ImageCodec::_is_initialized = false [static, protected, inherited]
 

std::map< String, Codec * > Ogre::Codec::ms_mapCodecs [static, protected, inherited]
 

A map that contains all the registered codecs.

Copyright © 2002 by The OGRE Team