What are the differences between resizeImage
and scaleImage
?
I need to resize an image if its size is > $myLimit
Example (pseudocode):
$myLimit = 1MB
user uplaod an image of 1000x1000 of 2MB
2MB > $myLimit
while( $imagefilesize > $myLimit ) {
resizeImageBy 0.9%;
}
//> output 900x900 image of 900 kB
In the while
block, which of the two methods should I use?
Edit: I found something that could help: http://www.imagemagick.org/Usage/resize/ But could someone simplify that?