diff options
| author | czaks <marcin@6irc.net> | 2013-07-22 10:14:17 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-07-22 10:14:17 -0400 |
| commit | 805c7298923a9d0ffe74ae3609fb69a23cd57bc3 (patch) | |
| tree | feb81d1d48c88a7448250247f2b77daa79fe82f5 /post.php | |
| parent | e5663953b534f8098acff8f2942fdb81c2942acf (diff) | |
| parent | 51361d02fb4b66a198dcdb5cd6350e6dada0aac9 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -422,10 +422,11 @@ if (isset($_POST['delete'])) { error($config['error']['maxsize']); } - // The following code corrects the image orientation based on EXIF. - // 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') { - if ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg') { + + 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)); @@ -475,7 +476,7 @@ if (isset($_POST['delete'])) { $thumb->_destroy(); } - if ($config['redraw_image']) { + if ($config['redraw_image'] || ($config['strip_exif'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg'))) { $image->to($post['file']); $dont_copy_file = true; } |
