Voting

: two minus one?
(Example: nine)

The Note You're Voting On

julien at go-on-web dot com
11 years ago
Windows does not accept floating width and height...

So, in "Example #2 Resampling an image proportionally", prefer :
<?php
if ($width/$height > $ratio_orig) {
$width = round( $height*$ratio_orig );
} else {
$height = round( $width/$ratio_orig );
}
?>
(used "round")
otherwise your image wont be resized.

<< Back to user notes page

To Top