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 <OgreILCodecs.h>`

Inheritance diagram for Ogre::PNGCodec:

[legend]
List of all members.

## Public Methods

String | getType () const
| Returns the type of the codec as a String.
unsigned int | getILType (void) const
void | code (const DataChunk &input, DataChunk *output,...) const
| Codes the data in the input chunk and saves the result in the output chunk.
CodecData * | decode (const DataChunk &input, DataChunk *output,...) const
| Codes the data from the input chunk into the output chunk.
void | codeToFile (const DataChunk &input, const String &outFileName, CodecData *pData) const
| Encodes data to a file.
void | initialiseIL (void)

## Static Public Methods

void | registerCodec (Codec *pCodec)
| Registers a new codec in the database.
void | unRegisterCodec (Codec *pCodec)
| Unregisters a codec from the database.
Codec * | getCodec (const String &extension)
| Gets the codec registered for the passed in file extension.

## Protected Types

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

## Static Protected Attributes

CodecList | ms_mapCodecs
| A map that contains all the registered codecs.

## Detailed Description

ImageCodec specialized in Portable Network Graphics images.

Definition at line 95 of file OgreILCodecs.h.

## Member Typedef Documentation

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

| Definition at line 44 of file OgreCodec.h.

## Member Function Documentation

void Ogre::ILImageCodec::code | ( | const DataChunk & | input,
|  | DataChunk * | output,
|  | ... |
| ) | const`[virtual, inherited]`

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.

Definition at line 42 of file OgreILImageCodec.cpp.

References Except, OgreGuard, and OgreUnguard.

void Ogre::ILImageCodec::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::ImageCodec.

Codec::CodecData * Ogre::ILImageCodec::decode | ( | const DataChunk & | input,
|  | DataChunk * | output,
|  | ... |
| ) | const`[virtual, inherited]`

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.

Definition at line 80 of file OgreILImageCodec.cpp.

References Ogre::DataChunk::allocate(), Except, Ogre::ILImageCodec::getILType(), Ogre::DataChunk::getPtr(), Ogre::DataChunk::getSize(), Ogre::IF_COMPRESSED, Ogre::IF_CUBEMAP, Ogre::ilFormat2OgreFormat(), OgreGuard, OgreUnguardRet, Ogre::RSC_TEXTURE_COMPRESSION_DXT, and Ogre::uint.

Codec * Ogre::Codec::getCodec | ( | const String & | extension | ) | `[static, inherited]`

| Gets the codec registered for the passed in file extension. Definition at line 37 of file OgreCodec.cpp. References Except, Ogre::Codec::ms_mapCodecs, and Ogre::String.

unsigned int Ogre::PNGCodec::getILType | ( | void |  | ) | const`[virtual]`

| Implements Ogre::ILImageCodec. Definition at line 94 of file OgreILCodecs.cpp.

String Ogre::PNGCodec::getType | ( |  | ) | const`[virtual]`

| Returns the type of the codec as a String. Implements Ogre::ILImageCodec. Definition at line 98 of file OgreILCodecs.h. References Ogre::String.

void Ogre::ILImageCodec::initialiseIL | ( | void |  | ) | `[inherited]`

| Definition at line 189 of file OgreILImageCodec.cpp. References Ogre::ILImageCodec::_is_initialised.

void Ogre::Codec::registerCodec | ( | Codec * | pCodec | ) | `[static, inherited]`

| Registers a new codec in the database. Definition at line 65 of file OgreCodec.h. References Ogre::Codec::getType().

void Ogre::Codec::unRegisterCodec | ( | Codec * | pCodec | ) | `[static, inherited]`

| Unregisters a codec from the database. Definition at line 72 of file OgreCodec.h. References Ogre::Codec::getType().

## Member Data Documentation

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

| A map that contains all the registered codecs. Definition at line 32 of file OgreCodec.cpp. Referenced by Ogre::Codec::getCodec().

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

- OgreILCodecs.h
- OgreILCodecs.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:26 2004