Changeset 1849
- Timestamp:
- 01/28/2008 02:55:43 PM (12 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/drivers/Image/GD.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Image/GD.php
r1848 r1849 180 180 } 181 181 182 // Recalculate the width and height, if they are missing 183 empty($properties['width']) and $properties['width'] = round($width * $properties['height'] / $height); 184 empty($properties['height']) and $properties['height'] = round($height * $properties['width'] / $width); 185 182 186 if (empty($properties['height']) OR $properties['master'] === Image::WIDTH) 183 187 { 184 // Recalculate the height 188 // Recalculate the height based on the width 185 189 $properties['height'] = round($height * $properties['width'] / $width); 186 190 } … … 188 192 if (empty($properties['width']) OR $properties['master'] === Image::HEIGHT) 189 193 { 190 // Recalculate the width 194 // Recalculate the width based on the height 191 195 $properties['width'] = round($width * $properties['height'] / $height); 192 196 }
