BitmapImage is the basic runtime primitive to load, hold, and convert image data in memory. More...
Public Member Functions | |
BitmapImage (int width, int height, GraphicsFormat format, String name) | |
Creates a BitmapImage. More... | |
BitmapImage (int width, int height, GraphicsFormat format, byte[] data, String name) | |
Creates a BitmapImage. More... | |
GraphicsFormat | getDataFormat () |
Returns the GraphicsFormat of this BitmapImage. More... | |
long | getHeight () |
Returns the width of this BitmapImage. More... | |
long | getHeight (long mipmapLevel) |
Returns the height of the given mipmaplevel of this BitmapImage. More... | |
long | getMipmapLevelCount () |
Returns the mipmap level count of this BitmapImage. More... | |
long | getNative () |
Gets a pointer to the backing C++ instance. More... | |
long | getWidth () |
Returns the width of this BitmapImage. More... | |
long | getWidth (long mipmapLevel) |
Returns the width of the given mipmaplevel of this BitmapImage. More... | |
void | premultiplyAlpha () |
Premultiplies the color and luminance channels by the alpha channel. | |
BitmapImage is the basic runtime primitive to load, hold, and convert image data in memory.
Each image has width, height, pixel format, image data in memory, and can contain mipmap images.
To display an image, you must create a texture instance from that image. When you do so, you must transfer the ownership of the image to the texture instance using TextureBuilder.
BitmapImage | ( | int | width, |
int | height, | ||
GraphicsFormat | format, | ||
String | name | ||
) |
Creates a BitmapImage.
width | Width for this BitmapImage. |
height | Height for this BitmapImage. |
format | GraphicsFormat for this BitmapImage. |
name | Name for this BitmapImage. |
BitmapImage | ( | int | width, |
int | height, | ||
GraphicsFormat | format, | ||
byte[] | data, | ||
String | name | ||
) |
Creates a BitmapImage.
width | Width for this BitmapImage. |
height | Height for this BitmapImage. |
format | GraphicsFormat for this BitmapImage. |
data | Data for this BitmapImage. |
name | Name for this BitmapImage. |
GraphicsFormat getDataFormat | ( | ) |
Returns the GraphicsFormat of this BitmapImage.
long getHeight | ( | ) |
Returns the width of this BitmapImage.
long getHeight | ( | long | mipmapLevel | ) |
Returns the height of the given mipmaplevel of this BitmapImage.
mipmapLevel | The mipmap level of the BitmapImage to get the height of. |
long getMipmapLevelCount | ( | ) |
Returns the mipmap level count of this BitmapImage.
long getNative | ( | ) |
Gets a pointer to the backing C++ instance.
long getWidth | ( | ) |
Returns the width of this BitmapImage.
long getWidth | ( | long | mipmapLevel | ) |
Returns the width of the given mipmaplevel of this BitmapImage.
mipmapLevel | The mipmap level of the BitmapImage to get the width of. |