summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-01 23:43:20 -0400
committerczaks <marcin@6irc.net>2013-08-01 23:43:20 -0400
commit1ed45ebe9e39724ec70098abfcd267d8ac478511 (patch)
treeda133b7426dedaf0785f64be752aa0437de7e80a /post.php
parentdc84ccc6a8e0b6fd3fc626eb1f321e4cf2d05511 (diff)
parent40ab2e0c1728fab613bc16a19ab8fcb3fa78c1d4 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: stylesheets/dark.css stylesheets/futaba+vichan.css stylesheets/miku.css stylesheets/stripes.css stylesheets/testorange.css stylesheets/wasabi.css
Diffstat (limited to 'post.php')
-rw-r--r--post.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/post.php b/post.php
index d3d869cf..254b8a52 100644
--- a/post.php
+++ b/post.php
@@ -452,10 +452,12 @@ if (isset($_POST['delete'])) {
if ($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['thumb_method'] == 'convert') {
- $exif = exif_read_data($upload);
- if (isset($exif['Orientation']) && $exif['Orientation'] != 1) {
- shell_exec('convert ' . escapeshellarg($upload) . ' -auto-orient ' . escapeshellarg($upload));
+ if (!($config['redraw_image'] || ($config['strip_exif'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg')))) {
+ if ($config['thumb_method'] == 'convert' || $config['thumb_method'] == 'convert+gifsicle') {
+ $exif = exif_read_data($upload);
+ if (isset($exif['Orientation']) && $exif['Orientation'] != 1) {
+ shell_exec('convert ' . escapeshellarg($upload) . ' -auto-orient ' . escapeshellarg($upload));
+ }
}
}
}