Menu

#395 EXIF-"rotated" jpeg aren't resized properly

v1.0_(example)
closed-wont-fix
None
5
2016-10-09
2016-08-07
No

if a jpeg photo has EXIF info saying that it's actually rotated by 90 degrees
then -size and -resize options do not work right: x dimension looks at physical x (which is y) and visa versa.
Example: a jpeg 200x100 with EXIF info saying "rotate 90 degrees clockwise" represents 100x200 image. If I -resize 50x then it makes 25x50, but it should produce 50x100.

Related

Bugs: #395

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2016-08-07

    On Sun, 7 Aug 2016, Ildar Mulyukov wrote:

    if a jpeg photo has EXIF info saying that it's actually rotated by
    90 degrees then -size and -resize options do not work right: x
    dimension looks at physical x (which is y) and visa versa.
    Example: a jpeg 200x100 with EXIF info saying "rotate 90 degrees
    clockwise" represents 100x200 image. If I -resize 50x then it makes
    25x50, but it should produce 50x100.

    Does adding the option '-auto-orient' prior to the -resize request
    solve the problem?

    Please note that -size does not resize images

    Bob

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2016-10-04
    • status: open --> closed-wont-fix
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2016-10-04

    A fix for sometimes missing EXIF orientation has been applied as part of bug 400. Otherwise it is recommended to use -auto-orient before the resize request. GraphicsMagick expects that requests apply to the image pixels in their current raster form and it does not translate user requests to based on the orientation tag. We do not intend to change this.

     
  • Ildar Mulyukov

    Ildar Mulyukov - 2016-10-09

    Hi, Bob,
    Sorry for the delay.
    Unfortunatelly '-auto-orient' doesn't work for me:

    gm convert "$f" -auto-orient -resize $SIZE -background black -gravity center -extent $SIZE "$out.jpg"

    still ignores EXIF info which is for one of my photos:

    $ LANG=C exif IMG_0151.JPG | grep Orientation
    Orientation |Right-top

    GraphicsMagick 1.3.18

     

    Last edit: Ildar Mulyukov 2016-10-09
  • Ildar Mulyukov

    Ildar Mulyukov - 2016-10-09

    Sorry, not true. Now the resize processes as expected.
    But I found that:

    1. the resulting image has still >>Orientation |Right-top<< while the picture already rotated.
    2. man page still says "gm convert -size 800x600 input.jpg ... -resize" while you write: "Please note that -size does not resize images"
     
    • Bob Friesenhahn

      Bob Friesenhahn - 2016-10-09

      On Sun, 9 Oct 2016, Ildar Mulyukov wrote:

      Sorry, not true. Now the resize processes as expected.
      But I found that:
      1. the resulting image has still >>Orientation |Right-top<< while the picture already rotated.
      2. man page still says "gm convert -size 800x600 input.jpg ... -resize" while you write: "Please note that -size does not resize images"

      You are reading documentation for the -extent option, which does use
      -size.

      The -size option needs to be provided for formats where the size is
      not already known.

      The -resize (or -geometry) options resize the raster image.

      The version of GraphicsMagick you are using is very old. Regardless,
      GraphicsMagick's support for EXIF is still not very good yet in that
      it does not support modifying the EXIF to take changes into account.

      Bob

      ** [bugs:#395] EXIF-"rotated" jpeg aren't resized properly**

      Status: closed-wont-fix
      Group: v1.0_(example)
      Created: Sun Aug 07, 2016 02:39 PM UTC by Ildar Mulyukov
      Last Updated: Sun Oct 09, 2016 09:03 PM UTC
      Owner: Bob Friesenhahn

      if a jpeg photo has EXIF info saying that it's actually rotated by 90 degrees
      then -size and -resize options do not work right: x dimension looks at physical x (which is y) and visa versa.
      Example: a jpeg 200x100 with EXIF info saying "rotate 90 degrees clockwise" represents 100x200 image. If I -resize 50x then it makes 25x50, but it should produce 50x100.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/graphicsmagick/bugs/395/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

      --
      Bob Friesenhahn
      bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
      GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

       

      Related

      Bugs: #395


Log in to post a comment.

MongoDB Logo MongoDB