Picture.GetData
From Xojo Documentation
This item was deprecated in version 2019r2. Please use Picture.ToData as a replacement. |
Method
Picture.GetData(format As String, quality As Integer = QualityDefault) As MemoryBlock
Supported for all project types and targets.
Supported for all project types and targets.
Converts the Picture to a MemoryBlock.
Notes
Valid formats are:
- Picture.FormatBMP (not supported in Console apps)
- Picture.FormatGIF (not supported in Console apps)
- Picture.FormatJPEG
- Picture.FormatPNG
- Picture.FormatTIFF (not supported in Console apps)
If you are using the JPEG format, then there is an optional parameter for the quality of the JPEG. You specify the quality using the following class constants instead of the literal values.
Introduced 2010r5
Constant | Value |
---|---|
QualityDefault | -1 |
QualityMax | 100 |
QualityHigh | 80 |
QualityMedium | 50 |
QualityLow | 25 |
QualityMin | 0 |
Example
This example uses GetData to convert an image in an ImageWell into a MemoryBlock