New Zenner
- Join Date:
- Jul 2006
- Posts:
- 16
- Plugin Contributions:
- 0
[DONE 1.3.5] Fractional Image Sizes - syntax error
Resizing images can give a syntax error because of fractional pixel dimensions. For example I have a graphic on the front page (http://prints.brianthebrain.com) that has the dimensions
width="200" height="90.909090909091" and on the category page
width="300" height="136.36363636364"
I have edited the file includes/functions/html_output.php around lines 219 and 221.
219 $width = $image_size[0] * $ratio;
220 } else {
221 $height = $image_size[1] * $ratio;
222 }
to
219 $width = round($image_size[0] * $ratio);
220 } else {
221 $height = round($image_size[1] * $ratio);
222 }
This has corrected the error on my local copy of the cart.
I would rather do the correction here rather than do slight tweaks on the catalog image. Or maybe there is a better fix.
zen-cart 1.3.02