Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.1
    • Fix Version/s: None
    • Component/s: Posting
    • Labels:
      None
    • Environment:
      CentOS 7, PHP 7.0.22

      Description

      Phones, cameras and other devices often use the orientation flag in the EXIF meta data, For portraits the raw file data is flipped sideways but most browsers support this flag and flip the image to the correct orientation.

      plupload handles this correctly when resizing client side and preserves the EXIF data. Thumbnails processed by phpBB have the EXIF data stripped and the browser orients the image based on the raw file, sideways if it's s portrait.

      https://www.phpbb.com/community/viewtopic.php?f=556&t=2434416#p14802971

      Both Imagemagick and GD can handle this, for example if Imagemcick is selected for image manipulation on line 564 of includes/functions_posting.php if you add the -auto-orient flag you get the desired orientation for the thumbnail.

      @passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -auto-orient -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" "' . str_replace('\\', '/', $destination) . '"');
      

      AFAIK Imagemagick should not be stripping the EXIF data to begin with, not sure why it is being stripped. Might be something to explore.

      For GD to handle it correctly I believe the EXIF extension would need to be installed. I would propose a suitable solution may be having plupload handle thumbnail creation, that would avoid issues with server side compatibility.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              thecoalman thecoalman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: