Browse Source

Bugfix: exif_read_data() Incorrect APP1 Exif Identifier Code

pull/40/head
Michael Foster 11 years ago
parent
commit
373fb99a7f
  1. 2
      inc/image.php
  2. 2
      post.php

2
inc/image.php

@ -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;
}

2
post.php

@ -452,7 +452,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']) {

Loading…
Cancel
Save