Picture.BestRepresentation
From Xojo Documentation
Method
Picture.BestRepresentation(width As Integer, height As Integer, scale As Double) As Picture
Supported for all project types and targets.
Supported for all project types and targets.
Calculates which picture is the best to use for drawing at the requested size.
Notes
The algorithm iterates through the indexed images, first finding picture with the closest number of pixels to the destination, preferring the next largest image if no exact match is found. If multiple pictures match, the picture with the DPI closest to the destination scale is chosen. It is possible that this function returns Self.
Raises an InvalidArgumentException if width, height, or scale are less than or equal to zero.