"; } // if ($_SESSION["image_resizing"]=="resizing") // 4. calculate the resulting heigt and width if ($_SESSION["image_resizing"]=="resizing" or $slideshow==1) { if ($resize_factor_width<=1 and $resize_factor_height<=1) { if ($resize_factor_width > $resize_factor_height) { $image_width=$target_width; $image_height=ceil($source_height*$resize_factor_width); } if ($resize_factor_width < $resize_factor_height) { $image_width=ceil($source_width*$resize_factor_height); $image_height=$target_height; } else // both resize factors are equal { $image_width=ceil($source_width*$resize_factor_width); $image_height=ceil($source_height*$resize_factor_height); } //echo "image width=".$image_width."
"; //echo "image height=".$image_height; } //if ($resize_factor_width<=1 and $resize_factor_height<=1) else // no resizing required { $image_width=$source_width; $image_height=$source_height; } } //if ($_SESSION["image_resizing"]=="resizing") // storing the resulting height and width in an array and returning it $image_height_width[]=$image_height; $image_height_width[]=$image_width; return $image_height_width; */ $result = array(); if ($_SESSION['image_resizing'] == 'resizing' or $slideshow==1) { $new_sizes = api_resize_image($image, $target_width, $target_height); $result[] = $new_sizes['height']; $result[] = $new_sizes['width']; } else { $result[] = $image_height; $result[] = $image_width; } return $result; } ?>