Urho.Resources.Image Class

%Image resource.

See Also: Image

Syntax

public class Image : Resource

Remarks

Save the image to a file. Format of the image is determined by file extension. JPG is saved with maximum quality.

Requirements

Namespace: Urho.Resources
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.Resources.Image are listed below.

See Also: Resource

Public Constructors

Constructs a new instance of Urho.Resources.Image which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Resources.Image, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Resources.Image linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

[read-only]
ArrayBoolean. Whether this texture has been detected as a volume, only relevant for DDS.
[read-only]
ComponentsUInt32. Return number of color components.
[read-only]
CompressedBoolean. Return whether is compressed.
[read-only]
CompressedFormatCompressedFormat. Return compressed format.
[read-only]
CubemapBoolean. Whether this texture is detected as a cubemap, only relevant for DDS.
[read-only]
DataByte*. Return pixel data.
[read-only]
DepthInt32. Return depth.
[read-only]
HeightInt32. Return height.
[read-only]
NextLevelImage. Return next mip level by bilinear filtering.
[read-only]
NextSiblingImage. Return the next sibling image of an array or cubemap.
[read-only]
NumCompressedLevelsUInt32. Return number of compressed mip levels.
[read-only]
SRGBBoolean. Whether this texture is in sRGB, only relevant for DDS.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.
[read-only]
WidthInt32. Return width.

Public Methods

override
BeginLoad(File) : Boolean
override
BeginLoad(MemoryBuffer) : Boolean
CleanupLevels()
Clean up the mip levels.
Clear(Color)
Clear the image with a color.
ClearInt(UInt32)
Clear the image with an integer color. R component is in the 8 lowest bits.
ConvertToRGBA() : Image
Return image converted to 4-component (RGBA) to circumvent modern rendering API's not supporting e.g. the luminance-alpha format.
FlipHorizontal() : Boolean
Flip image horizontally. Return true if successful.
FlipVertical() : Boolean
Flip image vertically. Return true if successful.
GetCompressedLevel(UInt32) : CompressedLevel
Return a compressed mip level.
GetPixel(Int32, Int32) : Color
Return a 2D pixel color.
GetPixel(Int32, Int32, Int32) : Color
Return a 3D pixel color.
GetPixelBilinear(Single, Single) : Color
Return a bilinearly sampled 2D pixel color. X and Y have the range 0-1.
GetPixelInt(Int32, Int32) : UInt32
Return a 2D pixel integer color. R component is in the 8 lowest bits.
GetPixelInt(Int32, Int32, Int32) : UInt32
Return a 3D pixel integer color. R component is in the 8 lowest bits.
GetPixelTrilinear(Single, Single, Single) : Color
Return a trilinearly sampled 3D pixel color. X, Y and Z have the range 0-1.
GetSubimage(IntRect) : Image
Return subimage from the image by the defined rect or null if failed. 3D images are not supported. You must free the subimage yourself.
LoadColorLUT(File) : Boolean
LoadColorLUT(MemoryBuffer) : Boolean
PrecalculateLevels()
Precalculate the mip levels. Used by asynchronous texture loading.
static
RegisterObject(Context)
Register object factory.
Resize(Int32, Int32) : Boolean
Resize image by bilinear resampling. Return true if successful.
override
Save(String) : Boolean
Save the image to a file. Format of the image is determined by file extension. JPG is saved with maximum quality.
override
Save(File) : Boolean
Save the image to a stream. Regardless of original format, the image is saved as png. Compressed image data is not supported. Return true if successful.
override
Save(MemoryBuffer) : Boolean
SaveBMP(String) : Boolean
Save in BMP format. Return true if successful.
SaveDDS(String) : Boolean
Save in DDS format. Only uncompressed RGBA images are supported. Return true if successful.
SaveJPG(String, Int32) : Boolean
Save in JPG format with compression quality. Return true if successful.
SavePNG(String) : Boolean
Save in PNG format. Return true if successful.
SaveTGA(String) : Boolean
Save in TGA format. Return true if successful.
SetData(Byte*)
Set new image data.
SetPixel(Int32, Int32, Color)
Set a 2D pixel.
SetPixel(Int32, Int32, Int32, Color)
Set a 3D pixel.
SetPixelInt(Int32, Int32, UInt32)
Set a 2D pixel with an integer color. R component is in the 8 lowest bits.
SetPixelInt(Int32, Int32, Int32, UInt32)
Set a 3D pixel with an integer color. R component is in the 8 lowest bits.
SetSize(Int32, Int32, UInt32) : Boolean
Set 2D size and number of color components. Old image data will be destroyed and new data is undefined. Return true if successful.
SetSize(Int32, Int32, Int32, UInt32) : Boolean
Set 3D size and number of color components. Old image data will be destroyed and new data is undefined. Return true if successful.