From Xojo Documentation
Calculates which picture is the best to use for drawing at the requested size.
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.