This class represents an image loaded into system memory. More...
#include <image.h>
Public Member Functions | |
Image () | |
Blank, no-init constructor. | |
Image (const String &ResourceName, const String &ResourceGroup) | |
Resource constructor. More... | |
Image (UInt8 *Data, const UInt32 Width, const UInt32 Height, const Graphics::PixelFormat Format, const Boole AutoDelete=false, const Whole NumFaces=1, const UInt8 NumMipMaps=0) | |
2D image buffer constructor. More... | |
Image (UInt8 *Data, const UInt32 Width, const UInt32 Height, const UInt32 Depth, const Graphics::PixelFormat Format, const Boole AutoDelete=false, const Whole NumFaces=1, const UInt8 NumMipMaps=0) | |
3D image buffer constructor. More... | |
~Image () | |
Class Destructor. | |
Ogre::Image & | _GetInternalImage () const |
Gets the internal Image this class is based on. More... | |
Image & | FlipAroundXAxis () |
Reverses the order of each pixel on the X axis. More... | |
Image & | FlipAroundYAxis () |
Reverses the order of each pixel on the Y axis. More... | |
UInt8 | GetBitsPerPixel () const |
Gets the number of bits allocated for each pixel in this image. More... | |
ColourValue | GetColourAt (const Whole X, const Whole Y, const Whole Z) const |
Gets the colour of an individual pixel in this image. More... | |
UInt32 | GetDepth () const |
Gets the depth of this image in pixels. More... | |
Graphics::PixelFormat | GetFormat () const |
Gets the pixel format of this image. More... | |
UInt32 | GetHeight () const |
Gets the height of this image in pixels. More... | |
UInt8 * | GetImageData () |
Gets the raw image data. More... | |
const UInt8 * | GetImageData () const |
Gets the raw image data. More... | |
Whole | GetNumFaces () const |
Gets the number of faces for thie image. More... | |
Whole | GetNumMipMaps () const |
Gets the number of MipMaps that exist for this image. More... | |
Whole | GetRowSpan () const |
Gets the size of a row of pixels in this image. More... | |
Whole | GetSize () const |
Gets the size of this image. More... | |
UInt32 | GetWidth () const |
Gets the width of this image in pixels. More... | |
Image & | Initialize (UInt8 *Data, const UInt32 Width, const UInt32 Height, const Graphics::PixelFormat Format, const Boole AutoDelete=false, const Whole NumFaces=1, const UInt8 NumMipMaps=0) |
Loads an image from a buffer. More... | |
Image & | Initialize (UInt8 *Data, const UInt32 Width, const UInt32 Height, const UInt32 Depth, const Graphics::PixelFormat Format, const Boole AutoDelete=false, const Whole NumFaces=1, const UInt8 NumMipMaps=0) |
Loads an image from a buffer. More... | |
Image & | Load (const String &ResourceName, const String &ResourceGroup) |
Loads an image. More... | |
Image & | Load (const String &FilePathAndName) |
Loads an image from the disk. More... | |
Image & | Load (std::istream *Stream, const String &ExtensionHint="") |
Loads an image from an input stream. More... | |
Image & | Save (const String &FileName, const String &GroupName) |
Writes this image to the asset group. More... | |
Image & | Save (const String &FilePathAndName) |
Writes this image to the disk. More... | |
Image & | Save (const Graphics::ImageFileFormat Format, std::ostream *Stream) |
Writes this image in a final serializable form to an output stream. More... | |
Image & | Save (const String &Extension, std::ostream *Stream) |
Writes this image in a final serializable form to an output stream. More... | |
void | SetColourAt (const Whole X, const Whole Y, const Whole Z, const ColourValue &Colour) |
Sets the colour of an individual pixel in this image. More... | |
Protected Attributes | |
InternalImageData * | IID |
A pointer to the internal implementation of the Image. More... | |
Mezzanine::Graphics::Image::Image | ( | UInt8 * | Data, |
const UInt32 | Width, | ||
const UInt32 | Height, | ||
const Graphics::PixelFormat | Format, | ||
const Boole | AutoDelete = false , |
||
const Whole | NumFaces = 1 , |
||
const UInt8 | NumMipMaps = 0 |
||
) |
2D image buffer constructor.
Data | The buffer to load the image from. |
Width | The width of the image to be loaded. |
Height | The height of the image to be loaded. |
Format | The pixel format of the buffer being loaded. |
AutoDelete | Whether or not this image owns the buffer, allowing it to delete the buffer when it is done. |
NumFaces | The number of faces that exist for the image. |
NumMipMaps | The number of mipmaps that exist for the image. |
Mezzanine::Graphics::Image::Image | ( | UInt8 * | Data, |
const UInt32 | Width, | ||
const UInt32 | Height, | ||
const UInt32 | Depth, | ||
const Graphics::PixelFormat | Format, | ||
const Boole | AutoDelete = false , |
||
const Whole | NumFaces = 1 , |
||
const UInt8 | NumMipMaps = 0 |
||
) |
3D image buffer constructor.
Data | The buffer to load the image from. |
Width | The width of the image to be loaded. |
Height | The height of the image to be loaded. |
Depth | The depth of the image to be loaded. |
Format | The pixel format of the buffer being loaded. |
AutoDelete | Whether or not this image owns the buffer, allowing it to delete the buffer when it is done. |
NumFaces | The number of faces that exist for the image. |
NumMipMaps | The number of mipmaps that exist for the image. |
Ogre::Image & Mezzanine::Graphics::Image::_GetInternalImage | ( | ) | const |
Image & Mezzanine::Graphics::Image::FlipAroundXAxis | ( | ) |
Image & Mezzanine::Graphics::Image::FlipAroundYAxis | ( | ) |
UInt8 Mezzanine::Graphics::Image::GetBitsPerPixel | ( | ) | const |
ColourValue Mezzanine::Graphics::Image::GetColourAt | ( | const Whole | X, |
const Whole | Y, | ||
const Whole | Z | ||
) | const |
Gets the colour of an individual pixel in this image.
X | The X position of the pixel to retrieve. |
Y | The Y position of the pixel to retrieve. |
Z | The Z position of the pixel to retrieve. |
UInt32 Mezzanine::Graphics::Image::GetDepth | ( | ) | const |
Graphics::PixelFormat Mezzanine::Graphics::Image::GetFormat | ( | ) | const |
UInt32 Mezzanine::Graphics::Image::GetHeight | ( | ) | const |
UInt8 * Mezzanine::Graphics::Image::GetImageData | ( | ) |
const UInt8 * Mezzanine::Graphics::Image::GetImageData | ( | ) | const |
Whole Mezzanine::Graphics::Image::GetNumFaces | ( | ) | const |
Whole Mezzanine::Graphics::Image::GetNumMipMaps | ( | ) | const |
Whole Mezzanine::Graphics::Image::GetRowSpan | ( | ) | const |
Whole Mezzanine::Graphics::Image::GetSize | ( | ) | const |
UInt32 Mezzanine::Graphics::Image::GetWidth | ( | ) | const |
Image & Mezzanine::Graphics::Image::Initialize | ( | UInt8 * | Data, |
const UInt32 | Width, | ||
const UInt32 | Height, | ||
const Graphics::PixelFormat | Format, | ||
const Boole | AutoDelete = false , |
||
const Whole | NumFaces = 1 , |
||
const UInt8 | NumMipMaps = 0 |
||
) |
Loads an image from a buffer.
Data | The buffer to load the image from. |
Width | The width of the image to be loaded. |
Height | The height of the image to be loaded. |
Format | The pixel format of the buffer being loaded. |
AutoDelete | Whether or not this image owns the buffer, allowing it to delete the buffer when it is done. |
NumFaces | The number of faces that exist for the image. |
NumMipMaps | The number of mipmaps that exist for the image. |
Image & Mezzanine::Graphics::Image::Initialize | ( | UInt8 * | Data, |
const UInt32 | Width, | ||
const UInt32 | Height, | ||
const UInt32 | Depth, | ||
const Graphics::PixelFormat | Format, | ||
const Boole | AutoDelete = false , |
||
const Whole | NumFaces = 1 , |
||
const UInt8 | NumMipMaps = 0 |
||
) |
Loads an image from a buffer.
Data | The buffer to load the image from. |
Width | The width of the image to be loaded. |
Height | The height of the image to be loaded. |
Depth | The depth of the image to be loaded. |
Format | The pixel format of the buffer being loaded. |
AutoDelete | Whether or not this image owns the buffer, allowing it to delete the buffer when it is done. |
NumFaces | The number of faces that exist for the image. |
NumMipMaps | The number of mipmaps that exist for the image. |
Writes this image to the asset group.
FileName | The name of the file to save this as. |
GroupName | The name of the asset group to save this to. |
Writes this image to the disk.
FilePathAndName | The full path and filename of the image to be written. |
Image & Mezzanine::Graphics::Image::Save | ( | const Graphics::ImageFileFormat | Format, |
std::ostream * | Stream | ||
) |
Writes this image in a final serializable form to an output stream.
Format | The ImageFileFormat to encode the image with. |
Stream | A pointer to the stream to save this image to. |
Writes this image in a final serializable form to an output stream.
Extension | A string containing the extension to encode to (not including the period). |
Stream | A pointer to the stream to save this image to. |
void Mezzanine::Graphics::Image::SetColourAt | ( | const Whole | X, |
const Whole | Y, | ||
const Whole | Z, | ||
const ColourValue & | Colour | ||
) |
|
protected |