summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-03 22:21:02 -0400
committerczaks <marcin@6irc.net>2013-08-03 22:21:02 -0400
commit1e6b4cbd4a1e5f2ce394d0a2a4c1e760b84e02c6 (patch)
treece52a0f70920217be58e5bc6a81094721515087c /inc
parentf128811dd339c721b71956dea3c4798b6ef9438a (diff)
parent3d2de07a1f385dea5e15f2a9d05c42e0b8d9ba87 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'inc')
-rw-r--r--inc/image.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/image.php b/inc/image.php
index f4c21917..193e588e 100644
--- a/inc/image.php
+++ b/inc/image.php
@@ -325,8 +325,10 @@ class ImageConvert extends ImageBase {
escapeshellarg($this->temp))) || !file_exists($this->temp))
error('Failed to resize image!', null, $error);
} else {
- if ($config['convert_manual_orient'])
+ if ($config['convert_manual_orient'] && ($this->format == 'jpg' || $this->format == 'jpeg'))
$convert_args = str_replace('-auto-orient', ImageConvert::jpeg_exif_orientation($this->src), $config['convert_args']);
+ elseif ($config['convert_manual_orient'])
+ $convert_args = str_replace('-auto-orient', '', $config['convert_args']);
else
$convert_args = &$config['convert_args'];
if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
@@ -344,8 +346,10 @@ class ImageConvert extends ImageBase {
}
}
} else {
- if ($config['convert_manual_orient'])
+ if ($config['convert_manual_orient'] && ($this->format == 'jpg' || $this->format == 'jpeg'))
$convert_args = str_replace('-auto-orient', ImageConvert::jpeg_exif_orientation($this->src), $config['convert_args']);
+ elseif ($config['convert_manual_orient'])
+ $convert_args = str_replace('-auto-orient', '', $config['convert_args']);
else
$convert_args = &$config['convert_args'];
if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .