diff options
| author | czaks <marcin@6irc.net> | 2013-08-03 22:18:46 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-03 22:18:46 -0400 |
| commit | f128811dd339c721b71956dea3c4798b6ef9438a (patch) | |
| tree | 00dc194e5593899ffec0fb1caa1fa451eef70c0f /post.php | |
| parent | ddcad35f6ca434c8082e29db9ad92daab385a6ef (diff) | |
| parent | de62cced6fe1b7b158be34f1cc4d53d7527518b2 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -457,8 +457,16 @@ if (isset($_POST['delete'])) { $exif = exif_read_data($upload); $gm = in_array($config['thumb_method'], array('gm', 'gm+gifsicle')); if (isset($exif['Orientation']) && $exif['Orientation'] != 1) { - if($error = shell_exec_error(($gm ? 'gm ' : '') . 'convert ' . - escapeshellarg($upload) . ' -auto-orient ' . escapeshellarg($upload))) + if ($config['convert_manual_orient']) { + $error = shell_exec_error(($gm ? 'gm ' : '') . 'convert ' . + escapeshellarg($upload) . ' ' . + ImageConvert::jpeg_exif_orientation(false, $exif) . ' +profile "*" ' . + escapeshellarg($upload)); + } else { + $error = shell_exec_error(($gm ? 'gm ' : '') . 'convert ' . + escapeshellarg($upload) . ' -auto-orient ' . escapeshellarg($upload)); + } + if ($error) error('Could not auto-orient image!', null, $error); $size = @getimagesize($upload); } |
