aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/filestore.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r--engine/lib/filestore.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index 4e92fee21..0a30f5551 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -951,13 +951,7 @@ function get_image_resize_parameters($width, $height, $options) {
}
// check for upscaling
- // @todo This ignores squares, coordinates, and cropping. It's probably not the best idea.
- // Size checking should be done in action code, but for backward compatibility
- // this duplicates the previous behavior.
if (!$upscale && ($height < $new_height || $width < $new_width)) {
- // zero out offsets
- $widthoffset = $heightoffset = 0;
-
// determine if we can scale it down at all
// (ie, if only one dimension is too small)
// if not, just use original size.
@@ -968,10 +962,9 @@ function get_image_resize_parameters($width, $height, $options) {
} elseif ($width < $new_width) {
$ratio = $new_height / $height;
}
+
$selection_height = $height;
$selection_width = $width;
- $new_height = floor($height * $ratio);
- $new_width = floor($width * $ratio);
}
$params = array(
@@ -986,7 +979,6 @@ function get_image_resize_parameters($width, $height, $options) {
return $params;
}
-
// putting these here for now
function file_delete($guid) {
if ($file = get_entity($guid)) {