1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00
This commit is contained in:
czaks 2013-08-04 23:31:53 -04:00
commit 06d2dafa2a
2 changed files with 3 additions and 3 deletions

View File

@ -371,7 +371,7 @@ class ImageConvert extends ImageBase {
// For when -auto-orient doesn't exist (older versions)
static public function jpeg_exif_orientation($src, $exif = false) {
if (!$exif) {
$exif = exif_read_data($src);
$exif = @exif_read_data($src);
if (!isset($exif['Orientation']))
return false;
}

View File

@ -454,7 +454,7 @@ if (isset($_POST['delete'])) {
// 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'] && !$config['use_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);
$exif = @exif_read_data($upload);
$gm = in_array($config['thumb_method'], array('gm', 'gm+gifsicle'));
if (isset($exif['Orientation']) && $exif['Orientation'] != 1) {
if ($config['convert_manual_orient']) {
@ -530,7 +530,7 @@ if (isset($_POST['delete'])) {
if ($config['redraw_image'] || (!@$post['exif_stripped'] && $config['strip_exif'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg'))) {
if (!$config['redraw_image'] && $config['use_exiftool']) {
if($error = shell_exec_error('exiftool -q -all= ' . escapeshellarg($upload)))
if($error = shell_exec_error('exiftool -ignoreMinorErrors -q -q -all= ' . escapeshellarg($upload)))
error('Could not strip EXIF metadata!', null, $error);
} else {
$image->to($post['file']);