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.