Permalink
Browse files

Faster image check size

  • Loading branch information...
1 parent 3dfa2b5 commit fab55615af85730667d96819600fad3a718df0f1 @acidvertigo acidvertigo committed May 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 catalog/includes/functions/html_output.php
@@ -90,10 +90,10 @@ function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')
if ($image_size = @getimagesize($src)) {
if (empty($width) && tep_not_null($height)) {
$ratio = $height / $image_size[1];
- $width = intval($image_size[0] * $ratio);
+ $width = (int)($image_size[0] * $ratio);
} elseif (tep_not_null($width) && empty($height)) {
$ratio = $width / $image_size[0];
- $height = intval($image_size[1] * $ratio);
+ $height = (int)($image_size[1] * $ratio);
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];

0 comments on commit fab5561

Please sign in to comment.