Class BitmapConverter
Implements methods to convert bitmap sources.
Inheritance
System.Object
BitmapConverter
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Converter
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public static class BitmapConverter
Methods
View SourceConvertToBitmapSource(Byte[])
Creates a new instance of BitmapImage for given image data and unknown format.
Declaration
public static BitmapSource ConvertToBitmapSource(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | A image data. |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.BitmapSource | A BitmapSource instance or null. |
ConvertToBitmapSource(Byte[], String)
Converts the given bitmap
to a System.Windows.Media.Imaging.BitmapSource.
Declaration
public static BitmapSource ConvertToBitmapSource(byte[] bitmap, string extension)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bitmap | The signature as a byte array. |
System.String | extension | The extension of the signature (bmp, png,...). |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.BitmapSource | The signature as System.Windows.Media.Imaging.BitmapSource. |
ConvertToByteArray(String)
Converts the given bitmap
to a byte array.
Declaration
public static byte[] ConvertToByteArray(string bitmap)
Parameters
Type | Name | Description |
---|---|---|
System.String | bitmap | The signature as a string. |
Returns
Type | Description |
---|---|
System.Byte[] | The signature as a byte array. |
ConvertToString(Byte[])
Converts the given bitmap
to a string.
Declaration
public static string ConvertToString(byte[] bitmap)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bitmap | The signature as a byte array. |
Returns
Type | Description |
---|---|
System.String | The signature as a string. |