#include <OgreImage.h>
Public Methods | |
Image () | |
Standard constructor. More... | |
Image (const Image &img) | |
Copy-constructor - copies all the data from the target image. More... | |
virtual | ~Image () |
Standard destructor. More... | |
Image & | operator= (const Image &img) |
Assignment operator- copies all the data from the target image. More... | |
Image & | flipAroundY () |
Flips (mirrors) the image around the Y-axis. More... | |
Image & | flipAroundX () |
Flips (mirrors) the image around the X-axis. More... | |
Image & | loadRawData (const DataChunk &pData, ushort uWidth, ushort uHeight, PixelFormat eFormat) |
Loads raw data from memory. More... | |
Image & | load (const String &strFileName) |
Loads an image file. More... | |
Image & | load (const DataChunk &chunk, const String &type) |
Loads an image file from a chunk of memory. More... | |
uchar * | getData (void) |
Returns a pointer to the internal image buffer. More... | |
const uchar * | getData () const |
Returns a const pointer to the internal image buffer. More... | |
size_t | getSize () const |
Returns the size of the data buffer. More... | |
ushort | getWidth (void) const |
Gets the width of the image in pixels. More... | |
ushort | getHeight (void) const |
Gets the height of the image in pixels. More... | |
ushort | getRowSpan (void) const |
Gets the physical width in bytes of each row of pixels. More... | |
PixelFormat | getFormat () const |
Returns the image format. More... | |
uchar | getBPP () const |
Returns the number of bits per pixel. More... | |
bool | getHasAlpha () const |
Returns true if the image has an alpha component. More... | |
Static Public Methods | |
uchar | PF2PS (PixelFormat format) |
uchar | getNumElemBytes (PixelFormat format) |
Returns the size in bytes of an element of the given pixel format. More... | |
uchar | PF2BPP (PixelFormat format) |
uchar | getNumElemBits (PixelFormat format) |
Returns the size in bits of an element of the given pixel format. More... | |
bool | convReqsFlip (PixelFormat srcformat, PixelFormat destformat) |
Decides wether converting from a pixel format to another requires endian-flipping. More... | |
void | applyGamma (uchar *byffer, Real gamma, uint size, uchar bpp) |
Does gamma adjustment. More... | |
Private Attributes | |
ushort | m_uWidth |
ushort | m_uHeight |
PixelFormat | m_eFormat |
uchar | m_ucPixelSize |
uchar * | m_pBuffer |
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.
|
Standard constructor.
|
|
Copy-constructor - copies all the data from the target image.
|
|
Standard destructor.
|
|
Does gamma adjustment.
|
|
Decides wether converting from a pixel format to another requires endian-flipping.
|
|
Flips (mirrors) the image around the X-axis.
|
|
Flips (mirrors) the image around the Y-axis.
|
|
Returns the number of bits per pixel.
|
|
Returns a const pointer to the internal image buffer.
|
|
Returns a pointer to the internal image buffer.
|
|
Returns the image format.
|
|
Returns true if the image has an alpha component.
|
|
Gets the height of the image in pixels.
|
|
Returns the size in bits of an element of the given pixel format.
|
|
Returns the size in bytes of an element of the given pixel format.
|
|
Gets the physical width in bytes of each row of pixels.
|
|
Returns the size of the data buffer.
|
|
Gets the width of the image in pixels.
|
|
Loads an image file from a chunk of memory.
|
|
Loads an image file.
|
|
Loads raw data from memory. The pixel format has to be specified. |
|
Assignment operator- copies all the data from the target image.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team