summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-03 21:47:24 -0400
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-03 21:47:24 -0400
commitb373b39f44d87a8c1085433c5e848addcf1a8d72 (patch)
treeafd5ad4ca205d09cfb17ff01a112107f76da6cbf /post.php
parent8fe33d3b799c56979bbfb344de91d71e0a1f3049 (diff)
Bugfix: gm and auto-orient thumbnailing
Diffstat (limited to 'post.php')
-rw-r--r--post.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/post.php b/post.php
index 434bc7e2..3c3d6e62 100644
--- a/post.php
+++ b/post.php
@@ -450,7 +450,7 @@ if (isset($_POST['delete'])) {
if ($config['convert_auto_orient'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg')) {
// The following code corrects the image orientation.
// Currently only works with the 'convert' option selected but it could easily be expanded to work with the rest if you can be bothered.
- if (!($config['redraw_image'] || ($config['strip_exif'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg')))) {
+ if (!($config['redraw_image'] || (($config['strip_exif'] && !$config['strip_with_exiftool']) && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg')))) {
if (in_array($config['thumb_method'], array('convert', 'convert+gifsicle', 'gm', 'gm+gifsicle'))) {
$exif = exif_read_data($upload);
$gm = in_array($config['thumb_method'], array('gm', 'gm+gifsicle'));
@@ -458,6 +458,7 @@ if (isset($_POST['delete'])) {
if($error = shell_exec_error(($gm ? 'gm ' : '') . 'convert ' .
escapeshellarg($upload) . ' -auto-orient ' . escapeshellarg($upload)))
error('Could not auto-orient image!', null, $error);
+ $size = @getimagesize($upload);
}
}
}