Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15359

Upload pictures : Exif dimensions used instead of real image size

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 3.2.1
    • Fix Version/s: None
    • Component/s: Posting
    • Labels:
    • Environment:
      php version 5. 6. 31
       

      Description

      Hi.

       

      Abstract

      When a user upload a resized picture, phpbb use original filesize (exif data) and not real size of  picture.

       

      Context :

      phpbb3.2.1 with upload file restrictions set up as :

      max size : 1024 x 1024 pixels

      max file size : 1 Mb

      Several users claims since 3.2.1 update they can not post pictures altought they are conform.

      File example : http://www.greffer.net/images/uploads/test.jpg
      Size 465x830 pix, 280 ko

      When I upload with my admin account, no error.
      But, if I upload as simple user privilege, at the end of file upload, a error appears, saying that maximum size is 1024x1024 but the file uploaded is : 3920 x 2204.

      I test this file with a php test file with getimagesize function , itreturns :

       Array ( [0] => 465 [1] => 830 [2] => 2 [3] => width="465" height="830" [bits] => 8 [channels] => 3 [mime] => image/jpeg )

       The file image dimensions seems perfect.

      On french phpbb help forums, some others users have the same problem.

      It seems, if this data is available, that phpbb use EXIF image size and not picture real size (the original picture has been resized by the user, EXIT data contains original size, not size after resizing).

      Exif data of this picture :

       

       

       
      File size       : 280810 Bytes
      MIME type       : image/jpeg
      Image size      : 465 x 830
      Camera make     : Sony
      Camera model    : E2303
      Image timestamp : 2017:09:09 13:25:12
      Image number    : 
      Exposure time   : 1/132 s
      Aperture        : F2
      Exposure bias   : 0 EV
      Flash           : No, auto
      Flash bias      : 
      Focal length    : 3.6 mm
      Subject distance: Unknown
      ISO speed       : 100
      Exposure mode   : Not defined
      Metering mode   : Center weighted average
      Macro mode      : 
      Image quality   : 
      Exif Resolution : 3920 x 2204
      White balance   : Auto
      Thumbnail       : image/jpeg, 4600 Bytes
      Copyright       : 
      Exif comment    : 

       Image size and exif resolution are not egal.

      When I erase exif data exiv2 software, the upload is not OK.

      Best regards.

       

       

         

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Marc Marc
                Reporter:
                silenus silenus
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: