aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/filestore.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
commitca08eb6d170d375ef4fca53604956f3474c7db19 (patch)
treea1e96c6b0ae322fab93373a66e1951e2b3b9be48 /engine/lib/filestore.php
parentbe37104ac63cd25f2eac831ca03d6d2b19976e1c (diff)
downloadelgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.gz
elgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.bz2
Merged r6701:6756 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544
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)) {