Menu ▾ ▴

#20 [PATCH] JPEG rotate_exif bugs Version 3.12.0

closed
None
5
2012-10-31
2009-06-03
Anonymous
No

rotate_exif fix for loading jpegs with orientation id = 2 or = 4.

The existing code seems to be rotating incorrectly for orientation id's 2 and 4.

Discussion

  • Nobody/Anonymous

    Patch to fix incorrect loading of exif orientations id's 2 & 4.

     
  • Hervé Drolon

    Hervé Drolon - 2009-07-14

    Hi,
    This patch is invalid as rotation info is extracted from Exif metadata. What you suggest is to ignore Exif metadata for cases 2 or 4.

     
  • Nobody/Anonymous

    Drolon, my patch alters the action of the JPEG load code when an exif orientation id of 2 or 4 is encountered within a JPEG.

    I.e, the current code shows this:

    case 2: // "top, right side" => +180°
    rotated = FreeImage_RotateClassic(*dib, 180);

    As I read it "top, right" is not a 180° rotation. It is a mirror across the center Y axis. i.e: FreeImage_FlipHorizontal(*dib);

     
  • Hervé Drolon

    Hervé Drolon - 2009-07-14

    Sorry, I should read trackers more carefully :)
    So indeed you are right about Exif rotation (I've checked the Exif specification to be sure).
    Your suggested changes have been commited to the CVS.
    Thanks again for your help :)
    Hervé
    ps : do not reply to this tracker unless you need to reopen it. It will be closed automatically in 14 days.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Anonymous
Anonymous

Add attachments
Cancel