Set the image data from an image file, and scale the image during loading.
In case of failure, false
is returned and error
is set. The aspect ratio will always be maintained.
this |
An Image |
filename |
Filename to read the file from |
width |
Width to scale the image to, or -1 |
height |
Height to scale the image to, or -1 |
|