1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- function resize_image($image, $target_width, $target_height, $slideshow = 0) {
-
- $result = array();
- if ((isset($_SESSION['image_resizing']) && $_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 {
- $size = api_getimagesize($image);
- $result[] = $size['height'];
- $result[] = $size['width'];
- }
- return $result;
- }
|