#include <OgreImage.h>
Public Methods | |
Image () | |
Standard constructor. | |
Image (const Image &img) | |
Copy-constructor - copies all the data from the target image. | |
virtual | ~Image () |
Standard destructor. | |
Image & | operator= (const Image &img) |
Assignment operator- copies all the data from the target image. | |
Image & | flipAroundY () |
Flips (mirrors) the image around the Y-axis. | |
Image & | flipAroundX () |
Flips (mirrors) the image around the X-axis. | |
Image & | loadDynamicImage (uchar *pData, ushort uWidth, ushort uHeight, PixelFormat eFormat) |
Stores a pointer to raw data in memory. | |
Image & | loadRawData (const DataChunk &pData, ushort uWidth, ushort uHeight, PixelFormat eFormat) |
Loads raw data from memory. | |
Image & | load (const String &strFileName) |
Loads an image file. | |
Image & | load (const DataChunk &chunk, const String &type) |
Loads an image file from a chunk of memory. | |
uchar * | getData (void) |
Returns a pointer to the internal image buffer. | |
const uchar * | getData () const |
Returns a const pointer to the internal image buffer. | |
size_t | getSize () const |
Returns the size of the data buffer. | |
unsigned short | getNumMipmaps () const |
Returns the number of mipmaps contained in the image. | |
bool | hasFlag (const ImageFlags imgFlag) |
Returns true if the image has the appropriate flag set. | |
ushort | getWidth (void) const |
Gets the width of the image in pixels. | |
ushort | getHeight (void) const |
Gets the height of the image in pixels. | |
ushort | getDepth (void) const |
Gets the depth of the image. | |
ushort | getRowSpan (void) const |
Gets the physical width in bytes of each row of pixels. | |
PixelFormat | getFormat () const |
Returns the image format. | |
uchar | getBPP () const |
Returns the number of bits per pixel. | |
bool | getHasAlpha () const |
Returns true if the image has an alpha component. | |
Static Public Methods | |
uchar | PF2PS (PixelFormat format) |
uchar | getNumElemBytes (PixelFormat format) |
Returns the size in bytes of an element of the given pixel format. | |
uchar | PF2BPP (PixelFormat format) |
uchar | getNumElemBits (PixelFormat format) |
Returns the size in bits of an element of the given pixel format. | |
bool | convReqsFlip (PixelFormat srcformat, PixelFormat destformat) |
Decides wether converting from a pixel format to another requires endian-flipping. | |
void | applyGamma (uchar *buffer, Real gamma, size_t size, uchar bpp) |
Does gamma adjustment. | |
bool | formatHasAlpha (PixelFormat format) |
Private Attributes | |
ushort | m_uWidth |
ushort | m_uHeight |
ushort | m_uDepth |
uint | m_uSize |
ushort | m_uNumMipmaps |
int | m_uFlags |
PixelFormat | m_eFormat |
uchar | m_ucPixelSize |
uchar * | m_pBuffer |
bool | m_bAutoDelete |
Typically, you would want to use an Image object to load a texture when extra processing needs to be done on an image before it is loaded or when you want to blit to an existing texture.
Definition at line 51 of file OgreImage.h.
|
Standard constructor.
Definition at line 36 of file OgreImage.cpp. |
|
Copy-constructor - copies all the data from the target image.
Definition at line 47 of file OgreImage.cpp. |
|
Standard destructor.
Definition at line 54 of file OgreImage.cpp. References m_bAutoDelete, and m_pBuffer. |
|
Does gamma adjustment.
|
|
Decides wether converting from a pixel format to another requires endian-flipping.
Definition at line 255 of file OgreImage.h. References Ogre::PF_A2R10G10B10, Ogre::PF_A4L4, Ogre::PF_A4R4G4B4, Ogre::PF_A8R8G8B8, Ogre::PF_R5G6B5, Ogre::PF_R8G8B8, Ogre::PixelFormat, and Ogre::uchar. |
|
Flips (mirrors) the image around the X-axis.
Definition at line 186 of file OgreImage.cpp. References Except, m_pBuffer, m_ucPixelSize, m_uHeight, m_uWidth, OgreGuard, OgreUnguardRet, Ogre::uchar, and Ogre::ushort. Referenced by Ogre::Win32Window::writeContentsToFile(), and Ogre::SDLWindow::writeContentsToFile(). |
|
Flips (mirrors) the image around the Y-axis.
Definition at line 92 of file OgreImage.cpp. References Except, m_pBuffer, m_uHeight, m_uWidth, OgreGuard, OgreUnguardRet, Ogre::uchar, Ogre::uint, and Ogre::ushort. |
|
Definition at line 434 of file OgreImage.cpp. References Ogre::PF_A2R10G10B10, Ogre::PF_A4L4, Ogre::PF_A4R4G4B4, Ogre::PF_A8, Ogre::PF_A8R8G8B8, Ogre::PF_B10G10R10A2, Ogre::PF_B4G4R4A4, Ogre::PF_B5G6R5, Ogre::PF_B8G8R8, Ogre::PF_B8G8R8A8, Ogre::PF_L4A4, Ogre::PF_L8, Ogre::PF_R5G6B5, Ogre::PF_R8G8B8, Ogre::PF_UNKNOWN, and Ogre::PixelFormat. |
|
Returns the number of bits per pixel.
Definition at line 423 of file OgreImage.cpp. References m_ucPixelSize, and Ogre::uchar. Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), and Ogre::D3DTexture::loadImage3D(). |
|
Returns a const pointer to the internal image buffer.
|
|
Returns a pointer to the internal image buffer.
Definition at line 356 of file OgreImage.cpp. References m_pBuffer, and Ogre::uchar. Referenced by Ogre::ColourImageAffector::_affectParticles(), Ogre::D3D9Texture::_blitImagesToCubeTex(), Ogre::D3D9Texture::_blitImageToNormTex(), Ogre::ColourImageAffector::_initParticle(), Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::GLTexture::blitToTexture(), Ogre::D3D9Texture::blitToTexture(), Ogre::GLTexture::load(), Ogre::D3D9Texture::loadImage(), Ogre::GLTexture::rescaleNPower2(), Ogre::Win32Window::writeContentsToFile(), and Ogre::SDLWindow::writeContentsToFile(). |
|
Gets the depth of the image.
Definition at line 394 of file OgreImage.cpp. References m_uDepth, and Ogre::ushort. Referenced by Ogre::GLTexture::load(), and Ogre::GLTexture::loadImages(). |
|
Returns the image format.
Definition at line 417 of file OgreImage.cpp. References m_eFormat, and Ogre::PixelFormat. Referenced by Ogre::D3D9Texture::_blitImageToNormTex(), Ogre::D3D9Texture::blitToTexture(), Ogre::GLTexture::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), Ogre::ColourImageAffector::setImageAdjust(), and Ogre::TerrainSceneManager::setWorldGeometry(). |
|
Returns true if the image has an alpha component.
Definition at line 429 of file OgreImage.cpp. References m_eFormat. Referenced by Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), and Ogre::GLTexture::loadImages(). |
|
Gets the height of the image in pixels.
Definition at line 405 of file OgreImage.cpp. References m_uHeight, and Ogre::ushort. Referenced by Ogre::ColourImageAffector::_affectParticles(), Ogre::D3D9Texture::_blitImagesToCubeTex(), Ogre::D3D9Texture::_blitImageToNormTex(), Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::GLTexture::blitToTexture(), Ogre::D3D9Texture::blitToTexture(), Ogre::D3DTexture::blitToTexture(), Ogre::GLTexture::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::TerrainSceneManager::setWorldGeometry(). |
|
Returns the size in bits of an element of the given pixel format.
Definition at line 209 of file OgreImage.h. References Ogre::PF_A2R10G10B10, Ogre::PF_A4L4, Ogre::PF_A4R4G4B4, Ogre::PF_A8, Ogre::PF_A8R8G8B8, Ogre::PF_B10G10R10A2, Ogre::PF_B4G4R4A4, Ogre::PF_B5G6R5, Ogre::PF_B8G8R8, Ogre::PF_B8G8R8A8, Ogre::PF_DXT1, Ogre::PF_DXT2, Ogre::PF_DXT3, Ogre::PF_DXT4, Ogre::PF_DXT5, Ogre::PF_L4A4, Ogre::PF_L8, Ogre::PF_R5G6B5, Ogre::PF_R8G8B8, Ogre::PF_UNKNOWN, Ogre::PixelFormat, and Ogre::uchar. |
|
Returns the size in bytes of an element of the given pixel format.
Definition at line 157 of file OgreImage.h. References Ogre::PF_A2R10G10B10, Ogre::PF_A4L4, Ogre::PF_A4R4G4B4, Ogre::PF_A8, Ogre::PF_A8R8G8B8, Ogre::PF_B10G10R10A2, Ogre::PF_B4G4R4A4, Ogre::PF_B5G6R5, Ogre::PF_B8G8R8, Ogre::PF_B8G8R8A8, Ogre::PF_L4A4, Ogre::PF_L8, Ogre::PF_R5G6B5, Ogre::PF_R8G8B8, Ogre::PF_UNKNOWN, Ogre::PixelFormat, and Ogre::uchar. |
|
Returns the number of mipmaps contained in the image.
Definition at line 375 of file OgreImage.cpp. References m_uNumMipmaps. Referenced by Ogre::GLTexture::loadImages(). |
|
Gets the physical width in bytes of each row of pixels.
Definition at line 411 of file OgreImage.cpp. References m_ucPixelSize, m_uWidth, and Ogre::ushort. |
|
Returns the size of the data buffer.
Definition at line 369 of file OgreImage.cpp. References m_uSize. Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::GLTexture::load(), Ogre::D3D9Texture::loadImage(), and Ogre::GLTexture::rescaleNPower2(). |
|
Gets the width of the image in pixels.
Definition at line 399 of file OgreImage.cpp. References m_uWidth, and Ogre::ushort. Referenced by Ogre::ColourImageAffector::_affectParticles(), Ogre::D3D9Texture::_blitImagesToCubeTex(), Ogre::D3D9Texture::_blitImageToNormTex(), Ogre::D3DTexture::blitImage(), Ogre::D3DTexture::blitImage3D(), Ogre::GLTexture::blitToTexture(), Ogre::D3D9Texture::blitToTexture(), Ogre::D3DTexture::blitToTexture(), Ogre::GLTexture::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::TerrainSceneManager::setWorldGeometry(). |
|
Returns true if the image has the appropriate flag set.
Definition at line 381 of file OgreImage.cpp. References Ogre::ImageFlags, and m_uFlags. Referenced by Ogre::GLTexture::load(), and Ogre::GLTexture::loadImages(). |
|
Loads an image file from a chunk of memory.
Definition at line 319 of file OgreImage.cpp. References Ogre::Codec::decode(), Ogre::ImageCodec::ImageData::depth, Except, Ogre::ImageCodec::ImageData::flags, Ogre::ImageCodec::ImageData::format, Ogre::DataChunk::getPtr(), Ogre::ImageCodec::ImageData::height, m_eFormat, m_pBuffer, m_ucPixelSize, m_uDepth, m_uFlags, m_uHeight, m_uNumMipmaps, m_uSize, m_uWidth, Ogre::ImageCodec::ImageData::num_mipmaps, OgreGuard, OgreUnguardRet, PF2PS(), Ogre::ImageCodec::ImageData::size, and Ogre::ImageCodec::ImageData::width. |
|
|
Stores a pointer to raw data in memory. The pixel format has to be specified.
Definition at line 217 of file OgreImage.cpp. References m_bAutoDelete, m_eFormat, m_pBuffer, m_ucPixelSize, m_uHeight, m_uSize, m_uWidth, OgreGuard, OgreUnguardRet, PF2PS(), Ogre::PixelFormat, Ogre::uchar, and Ogre::ushort. |
|
Loads raw data from memory. The pixel format has to be specified. Definition at line 236 of file OgreImage.cpp. References Ogre::DataChunk::getPtr(), m_eFormat, m_pBuffer, m_ucPixelSize, m_uHeight, m_uSize, m_uWidth, OgreGuard, OgreUnguardRet, PF2PS(), Ogre::PixelFormat, Ogre::uchar, and Ogre::ushort. Referenced by Ogre::Font::createTextureFromFont(), Ogre::Quake3Level::extractLightmaps(), Ogre::GLTexture::load(), Ogre::Texture::loadRawData(), Ogre::Win32Window::writeContentsToFile(), and Ogre::SDLWindow::writeContentsToFile(). |
|
Assignment operator- copies all the data from the target image.
Definition at line 65 of file OgreImage.cpp. References m_bAutoDelete, m_eFormat, m_pBuffer, m_ucPixelSize, m_uDepth, m_uFlags, m_uHeight, m_uNumMipmaps, m_uSize, m_uWidth, and Ogre::uchar. |
|
Definition at line 196 of file OgreImage.h. References Ogre::PixelFormat, and Ogre::uchar. |
|
Definition at line 144 of file OgreImage.h. References Ogre::PixelFormat, and Ogre::uchar. Referenced by load(), loadDynamicImage(), and loadRawData(). |
|
Definition at line 441 of file OgreImage.h. Referenced by loadDynamicImage(), operator=(), and ~Image(). |
|
Definition at line 434 of file OgreImage.h. Referenced by getFormat(), getHasAlpha(), load(), loadDynamicImage(), loadRawData(), and operator=(). |
|
Definition at line 438 of file OgreImage.h. Referenced by flipAroundX(), flipAroundY(), getData(), load(), loadDynamicImage(), loadRawData(), operator=(), and ~Image(). |
|
Definition at line 437 of file OgreImage.h. Referenced by flipAroundX(), getBPP(), getRowSpan(), load(), loadDynamicImage(), loadRawData(), and operator=(). |
|
Definition at line 425 of file OgreImage.h. |
|
Definition at line 431 of file OgreImage.h. |
|
Definition at line 423 of file OgreImage.h. Referenced by flipAroundX(), flipAroundY(), getHeight(), load(), loadDynamicImage(), loadRawData(), and operator=(). |
|
Definition at line 429 of file OgreImage.h. Referenced by getNumMipmaps(), load(), and operator=(). |
|
Definition at line 427 of file OgreImage.h. Referenced by getSize(), load(), loadDynamicImage(), loadRawData(), and operator=(). |
|
Definition at line 421 of file OgreImage.h. Referenced by flipAroundX(), flipAroundY(), getRowSpan(), getWidth(), load(), loadDynamicImage(), loadRawData(), and operator=(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:26:23 2004