Class BitmapConverter
Implements methods to convert bitmap sources.
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 |
|---|---|---|
| byte[] | bytes | A image data. |
Returns
| Type | Description |
|---|---|
| BitmapSource | A BitmapSource instance or null. |
ConvertToBitmapSource(byte[], string)
Converts the given bitmap to a BitmapSource.
Declaration
public static BitmapSource ConvertToBitmapSource(byte[] bitmap, string extension)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bitmap | The signature as a byte array. |
| string | extension | The extension of the signature (bmp, png,...). |
Returns
| Type | Description |
|---|---|
| BitmapSource | The signature as BitmapSource. |
ConvertToByteArray(string)
Converts the given bitmap to a byte array.
Declaration
public static byte[] ConvertToByteArray(string bitmap)
Parameters
| Type | Name | Description |
|---|---|---|
| string | bitmap | The signature as a string. |
Returns
| Type | Description |
|---|---|
| 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 |
|---|---|---|
| byte[] | bitmap | The signature as a byte array. |
Returns
| Type | Description |
|---|---|
| string | The signature as a string. |