Method | Description | |
---|---|---|
Dispose ( ) : void |
Releases resources used by mipmap MemoryStreams.
|
|
GetWPFBitmap ( int maxDimension, bool ShowAlpha = false, int mipIndex ) : System.Windows.Media.Imaging.BitmapSource |
Creates a WPF Bitmap from largest mipmap. Does NOT require that image remains alive.
|
|
ImageEngineImage ( |
Creates an image supporting many formats including DDS.
|
|
ImageEngineImage ( MipMap mip ) : CSharpImageLibrary.DDS |
Creates image from mipmap.
|
|
ImageEngineImage ( byte imageData, int maxDimension ) : CSharpImageLibrary.DDS |
Creates an image supporting many formats including DDS.
|
|
ImageEngineImage ( string path, int maxDimension ) : CSharpImageLibrary.DDS |
Creates an image supporting many formats including DDS.
|
|
Load ( Stream stream, int maxDimension ) : void | ||
Resize ( double scale ) : void |
Scales top mipmap and DESTROYS ALL OTHERS.
|
|
Resize ( int DesiredDimension ) : void |
Resizes image. If single mip, scales to DesiredDimension. If multiple mips, finds closest mip and scales it (if required). DESTROYS ALL OTHER MIPS.
|
|
Save ( string destination, ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
Saves image in specified format to file. If file exists, it will be overwritten.
|
|
Save ( ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
Saves fully formatted image in specified format to byte array.
|
|
Save ( Stream destination, ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
Saves image in specified format to stream. Stream position not reset before or after.
|
|
ToString ( ) : string |
Gets string representation of ImageEngineImage.
|
Method | Description | |
---|---|---|
GetWPFBitmap ( MipMap mip, int maxDimension, bool ShowAlpha ) : System.Windows.Media.Imaging.BitmapSource |
public GetWPFBitmap ( int maxDimension, bool ShowAlpha = false, int mipIndex ) : System.Windows.Media.Imaging.BitmapSource | ||
maxDimension | int | Resizes image or uses a mipmap if available. Overrides mipIndex if specified. |
ShowAlpha | bool | True = flattens alpha, directly affecting RGB. |
mipIndex | int | Index of mipmap to retrieve. Overridden by maxDimension if it's specified. |
return | System.Windows.Media.Imaging.BitmapSource |
public ImageEngineImage ( |
||
stream | Stream containing image. | |
maxDimension | int | Max dimension of created image. Useful for mipmapped images, otherwise resized. |
return | CSharpImageLibrary.DDS |
public ImageEngineImage ( MipMap mip ) : CSharpImageLibrary.DDS | ||
mip | MipMap | Mipmap to use as source. |
return | CSharpImageLibrary.DDS |
public ImageEngineImage ( byte imageData, int maxDimension ) : CSharpImageLibrary.DDS | ||
imageData | byte | Fully formatted image data, not just pixels. |
maxDimension | int | Max dimension of created image. Useful for mipmapped images, otherwise resized. |
return | CSharpImageLibrary.DDS |
public ImageEngineImage ( string path, int maxDimension ) : CSharpImageLibrary.DDS | ||
path | string | Path to image. |
maxDimension | int | Max dimension of created image. Useful for mipmapped images, otherwise resized. |
return | CSharpImageLibrary.DDS |
public Load ( Stream stream, int maxDimension ) : void | ||
stream | Stream | |
maxDimension | int | |
return | void |
public Resize ( double scale ) : void | ||
scale | double | Scaling factor. |
return | void |
public Resize ( int DesiredDimension ) : void | ||
DesiredDimension | int | Desired size of images largest dimension. |
return | void |
public Save ( string destination, ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
||
destination | string | File to save to. |
format | ImageEngineFormat | Desired image format. |
GenerateMips | MipHandling | Determines how mipmaps are handled during saving. |
desiredMaxDimension | int | Maximum size for saved image. Resizes if required, but uses mipmaps if available. |
mipToSave | int | Index of mipmap to save as single image. |
removeAlpha | bool | True = Alpha removed. False = Uses threshold value and alpha values to mask RGB FOR DXT1 ONLY, otherwise removes completely. |
customMasks | List |
Custom user defined masks for colours. |
return | System.Threading.Tasks.Task |
public Save ( ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
||
format | ImageEngineFormat | Format to save as. |
GenerateMips | MipHandling | Determines how mipmaps are handled during saving. |
desiredMaxDimension | int | Maximum size for saved image. Resizes if required, but uses mipmaps if available. |
mipToSave | int | Index of mipmap to save directly. |
removeAlpha | bool | True = Alpha removed. False = Uses threshold value and alpha values to mask RGB FOR DXT1, otherwise completely removed. |
customMasks | List |
Custom user defined masks for colours. |
return | byte[] |
public Save ( Stream destination, ImageEngineFormat format, MipHandling GenerateMips, int desiredMaxDimension, int mipToSave, bool removeAlpha = true, List |
||
destination | Stream | Stream to write to at current position. |
format | ImageEngineFormat | Format to save to. |
GenerateMips | MipHandling | Determines how mipmaps are handled during saving. |
desiredMaxDimension | int | Maximum dimension of saved image. Keeps aspect. |
mipToSave | int | Specifies a mipmap to save within the whole. |
removeAlpha | bool | True = removes alpha. False = Uses threshold value and alpha values to mask RGB FOR DXT1 ONLY, otherwise removes completely. |
customMasks | List |
Custom user defined masks for DDS colours. |
return | void |