C# Class Accord.Imaging.Textures.TextureTools

Texture tools.

The class represents collection of different texture tools, like converting a texture to/from grayscale image.

Sample usage:

// create texture generator WoodTexture textureGenerator = new WoodTexture( ); // generate new texture float[,] texture = textureGenerator.Generate( 320, 240 ); // convert it to image to visualize Bitmap textureImage = TextureTools.ToBitmap( texture );
Mostra file Open project: accord-net/framework

Public Methods

Method Description
FromBitmap ( Bitmap image ) : ].float[

Convert grayscale bitmap to texture.

FromBitmap ( BitmapData imageData ) : ].float[

Convert grayscale bitmap to texture

FromBitmap ( UnmanagedImage image ) : ].float[

Convert grayscale bitmap to texture.

ToBitmap ( float texture ) : Bitmap

Convert texture to grayscale bitmap.

Private Methods

Method Description
TextureTools ( ) : System

Method Details

FromBitmap() public static method

Convert grayscale bitmap to texture.
Only grayscale (8 bpp indexed images) are supported.
public static FromBitmap ( Bitmap image ) : ].float[
image System.Drawing.Bitmap Image to convert to texture.
return ].float[

FromBitmap() public static method

Convert grayscale bitmap to texture
Only grayscale (8 bpp indexed images) are supported.
public static FromBitmap ( BitmapData imageData ) : ].float[
imageData System.Drawing.Imaging.BitmapData Image data to convert to texture
return ].float[

FromBitmap() public static method

Convert grayscale bitmap to texture.
Only grayscale (8 bpp indexed images) are supported.
public static FromBitmap ( UnmanagedImage image ) : ].float[
image UnmanagedImage Image data to convert to texture.
return ].float[

ToBitmap() public static method

Convert texture to grayscale bitmap.
public static ToBitmap ( float texture ) : Bitmap
texture float Texture to convert to bitmap.
return System.Drawing.Bitmap