C# Class OpenBve.ImageExtensions

Provides extension methods for working with images
Exibir arquivo Open project: leezer3/OpenBVE Class Usage Examples

Public Methods

Method Description
CombineBitmapAlpha ( Bitmap b, Bitmap s, Bitmap a ) : bool

Combines a RGB bitmap and a greyscale mask into a RGBA bitmap

ToByteArray ( this image, ImageFormat format ) : byte[]

Converts an image to a byte array

Method Details

CombineBitmapAlpha() public static method

Combines a RGB bitmap and a greyscale mask into a RGBA bitmap
public static CombineBitmapAlpha ( Bitmap b, Bitmap s, Bitmap a ) : bool
b System.Drawing.Bitmap The output bitmap
s System.Drawing.Bitmap The RGB source bitmap
a System.Drawing.Bitmap The greyscale mask
return bool

ToByteArray() public static method

Converts an image to a byte array
public static ToByteArray ( this image, ImageFormat format ) : byte[]
image this The image to convert
format System.Drawing.Imaging.ImageFormat The format of the image
return byte[]