Свойство | Type | Description | |
---|---|---|---|
bufPtr | |||
buffer | byte[] | ||
bufferPinnedHandle | |||
depth | int | ||
flags | ImageFlags | ||
format | PixelFormat | ||
height | int | ||
numMipMaps | int | ||
size | int | ||
width | int |
Méthode | Description | |
---|---|---|
ApplyGamma ( |
Variant of ApplyGamma that operates on an unmanaged chunk of memory
|
|
ApplyGamma ( byte buffer, float gamma, int size, int bpp ) : void |
Performs gamma adjustment on this image. Basic algo taken from Titan Engine, copyright (c) 2000 Ignacio Castano Iguado. |
|
CalculateSize ( int mipmaps, int faces, int width, int height, int depth, PixelFormat format ) : int | ||
CropImage ( Image source, uint offsetX, uint offsetY, int width, int height ) : Image |
Little utility function that crops an image (Doesn't alter the source image, returns a cropped representation)
|
|
FlipAroundX ( ) : void |
Flips this image around the X axis. This will invalidate any
|
|
FromDynamicImage ( byte buffer, int width, int height, PixelFormat format ) : Image |
Loads raw image data from a byte array.
|
|
FromDynamicImage ( byte buffer, int width, int height, int depth, PixelFormat format ) : Image |
Loads raw image data from a byte array.
|
|
FromDynamicImage ( byte buffer, int width, int height, int depth, PixelFormat format, bool autoDelete, int numFaces, int numMipMaps ) : Image | ||
FromFile ( string fileName ) : Image |
Loads an image file from the file system.
|
|
FromRawStream ( Stream stream, int width, int height, PixelFormat format ) : Image |
Loads raw image data from memory.
|
|
FromRawStream ( Stream stream, int width, int height, int depth, PixelFormat format ) : Image |
Loads raw image data from memory.
|
|
FromStream ( Stream stream, string type ) : Image |
Loads an image from a stream. This method allows loading an image from a stream, which is helpful for when images are being decompressed from an archive into a stream, which needs to be loaded as is. |
|
GetColorAt ( int x, int y, int z ) : |
||
GetPixelBox ( int face, int mipmap ) : |
Get a PixelBox encapsulating the image data of a mipmap
|
|
HasFlag ( ImageFlags flag ) : bool |
Checks if the specified flag is set on this image.
|
|
Image ( ) : System | ||
Resize ( int width, int height ) : void |
Resize a 2D image, applying the appropriate filter.
|
|
Resize ( int width, int height, ImageFilter filter ) : void |
Resize a 2D image, applying the appropriate filter.
|
|
Save ( String filename ) : void |
Saves the Image as a file The codec used to save the file is determined by the extension of the filename passed in Invalid or unrecognized extensions will throw an exception. |
|
Scale ( |
Scale a 1D, 2D or 3D image volume. This function can do pixel format conversion in the process. dst and src can point to the same PixelBox object without any problem |
|
Scale ( |
Scale a 1D, 2D or 3D image volume. This function can do pixel format conversion in the process. dst and src can point to the same PixelBox object without any problem |
Méthode | Description | |
---|---|---|
SetBuffer ( byte newBuffer ) : void | ||
dispose ( bool disposeManagedResources ) : void |
Class level dispose method When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } isDisposed = true; // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); } |
public static ApplyGamma ( |
||
bufPtr | ||
gamma | float | |
size | int | |
bpp | int | |
Résultat | void |
public static ApplyGamma ( byte buffer, float gamma, int size, int bpp ) : void | ||
buffer | byte | |
gamma | float | |
size | int | |
bpp | int | |
Résultat | void |
public static CalculateSize ( int mipmaps, int faces, int width, int height, int depth, PixelFormat format ) : int | ||
mipmaps | int | |
faces | int | |
width | int | |
height | int | |
depth | int | |
format | PixelFormat | |
Résultat | int |
public CropImage ( Image source, uint offsetX, uint offsetY, int width, int height ) : Image | ||
source | Image | The source image |
offsetX | uint | The X offset from the origin |
offsetY | uint | The Y offset from the origin |
width | int | The width to crop to |
height | int | The height to crop to |
Résultat | Image |
public FromDynamicImage ( byte buffer, int width, int height, PixelFormat format ) : Image | ||
buffer | byte | Raw image buffer. |
width | int | Width of this image data (in pixels). |
height | int | Height of this image data (in pixels). |
format | PixelFormat | Pixel format used in this texture. |
Résultat | Image |
public FromDynamicImage ( byte buffer, int width, int height, int depth, PixelFormat format ) : Image | ||
buffer | byte | Raw image buffer. |
width | int | Width of this image data (in pixels). |
height | int | Height of this image data (in pixels). |
depth | int | |
format | PixelFormat | Pixel format used in this texture. |
Résultat | Image |
public FromDynamicImage ( byte buffer, int width, int height, int depth, PixelFormat format, bool autoDelete, int numFaces, int numMipMaps ) : Image | ||
buffer | byte | |
width | int | |
height | int | |
depth | int | |
format | PixelFormat | |
autoDelete | bool | |
numFaces | int | |
numMipMaps | int | |
Résultat | Image |
public static FromFile ( string fileName ) : Image | ||
fileName | string | Full path to the image file on disk. |
Résultat | Image |
public static FromRawStream ( Stream stream, int width, int height, PixelFormat format ) : Image | ||
stream | Stream | Stream containing the raw image data. |
width | int | Width of this image data (in pixels). |
height | int | Height of this image data (in pixels). |
format | PixelFormat | Pixel format used in this texture. |
Résultat | Image |
public static FromRawStream ( Stream stream, int width, int height, int depth, PixelFormat format ) : Image | ||
stream | Stream | Stream containing the raw image data. |
width | int | Width of this image data (in pixels). |
height | int | Height of this image data (in pixels). |
depth | int | |
format | PixelFormat | Pixel format used in this texture. |
Résultat | Image |
public static FromStream ( Stream stream, string type ) : Image | ||
stream | Stream | Stream serving as the data source. |
type | string | /// Type (i.e. file format) of image. Used to decide which image decompression codec to use. /// |
Résultat | Image |
public GetColorAt ( int x, int y, int z ) : |
||
x | int | |
y | int | |
z | int | |
Résultat |
public GetPixelBox ( int face, int mipmap ) : |
||
face | int | |
mipmap | int | |
Résultat |
public HasFlag ( ImageFlags flag ) : bool | ||
flag | ImageFlags | The flag to check for. |
Résultat | bool |
public Resize ( int width, int height ) : void | ||
width | int | |
height | int | |
Résultat | void |
public Resize ( int width, int height, ImageFilter filter ) : void | ||
width | int | |
height | int | |
filter | ImageFilter | |
Résultat | void |
public Save ( String filename ) : void | ||
filename | String | Filename to save as |
Résultat | void |
public static Scale ( |
||
src | PixelBox containing the source pointer, dimensions and format | |
dst | PixelBox containing the destination pointer, dimensions and format | |
Résultat | void |
public static Scale ( |
||
src | PixelBox containing the source pointer, dimensions and format | |
scaled | PixelBox containing the destination pointer, dimensions and format | |
filter | ImageFilter | Which filter to use |
Résultat | void |
protected SetBuffer ( byte newBuffer ) : void | ||
newBuffer | byte | |
Résultat | void |
protected dispose ( bool disposeManagedResources ) : void | ||
disposeManagedResources | bool | True if Unmanaged resources should be released. |
Résultat | void |
protected GCHandle,System.Runtime.InteropServices bufferPinnedHandle | ||
Résultat |