StiImageConverter Class
Namespace: Stimulsoft.Base.Drawing
Class realize methods for conversion image to string and string to image.
Methods
| Method | Returns | Description |
|---|---|---|
BytesToImage static |
Image | Convert Bytes to Image. |
ImageToBytes static |
byte[] | Convert Image to Bytes. |
ImageToPackedString static |
string | Convert Image to packed String. |
ImageToString static |
string | Convert Image to String. |
PackedStringToImage static |
Image | Convert packed String to Image. |
StringToByteArray static |
byte[] | |
StringToImage static |
Image | Convert String to Image. |
TryBytesToImage static |
Image |
Method Details
BytesToImage static
BytesToImage(**: bytebytes, **width: int, height: int, stretch: bool, aspectRatio: bool): Image
Convert Bytes to Image.
Parameters
- ** (bytebytes)
- width (int)
- height (int)
- stretch (bool)
- aspectRatio (bool)
Returns Image
ImageToBytes static
ImageToBytes(image: Image, allowNulls: bool): byte[]
Convert Image to Bytes.
Parameters
- image (Image) — Image for converting.
- allowNulls (bool) — Returns null when image equal to null. Otherwise, return byte[0].
Returns byte[] — Result byte array.
ImageToPackedString static
ImageToPackedString(image: Image): string
Convert Image to packed String.
Parameters
- image (Image) — Image for converting.
Returns string — Result string.
ImageToString static
ImageToString(image: Image, allowNulls: bool): string
Convert Image to String.
Parameters
- image (Image) — Image for converting.
- allowNulls (bool) — Returns null when image equal to null. Otherwise, return byte[0].
Returns string — Result string.
PackedStringToImage static
PackedStringToImage(str: string): Image
Convert packed String to Image.
Parameters
- str (string) — String for converting.
Returns Image — Result Image.
StringToByteArray static
StringToByteArray(str: string): byte[]
Parameters
- str (string)
Returns byte[]
StringToImage static
StringToImage(str: string): Image
Convert String to Image.
Parameters
- str (string) — String for converting.
Returns Image — Result Image.
TryBytesToImage static
TryBytesToImage(**: bytebytes, **width: int, height: int, stretch: bool, aspectRatio: bool): Image
Parameters
- ** (bytebytes)
- width (int)
- height (int)
- stretch (bool)
- aspectRatio (bool)
Returns Image