OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::EXRCodec Class Reference

Codec specialized in loading OpenEXR high dynamic range images. More...

#include <OgreEXRCodec.h>

+ Inheritance diagram for Ogre::EXRCodec:

Public Member Functions

 EXRCodec ()
 
virtual ~EXRCodec ()
 
DataStreamPtr code (MemoryDataStreamPtr &input, CodecDataPtr &pData) const
 Codes the data in the input stream and saves the result in the output stream. More...
 
void codeToFile (MemoryDataStreamPtr &input, const String &outFileName, CodecDataPtr &pData) const
 Codes the data in the input chunk and saves the result in the output filename provided. More...
 
DecodeResult decode (DataStreamPtr &input) const
 Codes the data from the input chunk into the output chunk. More...
 
String getType () const
 
String magicNumberToFileExt (const char *magicNumberPtr, size_t maxbytes) const
 Maps a magic number header to a file extension, if this codec recognises it. More...
 

Detailed Description

Codec specialized in loading OpenEXR high dynamic range images.

Constructor & Destructor Documentation

◆ EXRCodec()

Ogre::EXRCodec::EXRCodec ( )

◆ ~EXRCodec()

virtual Ogre::EXRCodec::~EXRCodec ( )
virtual

Member Function Documentation

◆ code()

DataStreamPtr Ogre::EXRCodec::code ( MemoryDataStreamPtr input,
CodecDataPtr &  pData 
) const

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

◆ codeToFile()

void Ogre::EXRCodec::codeToFile ( MemoryDataStreamPtr input,
const String outFileName,
CodecDataPtr &  pData 
) const

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

Provided for efficiency since coding to memory is progressive therefore memory required is unknown leading to reallocations.

Parameters
inputThe input data
outFileNameThe filename to write to
pDataExtra information to be passed to the codec (codec type specific)

◆ decode()

DecodeResult Ogre::EXRCodec::decode ( DataStreamPtr input) const

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

Parameters
inputStream containing the encoded data

◆ getType()

String Ogre::EXRCodec::getType ( ) const

◆ magicNumberToFileExt()

String Ogre::EXRCodec::magicNumberToFileExt ( const char *  magicNumberPtr,
size_t  maxbytes 
) const

Maps a magic number header to a file extension, if this codec recognises it.

Parameters
magicNumberPtrPointer to a stream of bytes which should identify the file. Note that this may be more than needed - each codec may be looking for a different size magic number.
maxbytesThe number of bytes passed
Returns
A blank string if the magic number was unknown, or a file extension.

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