Modify

Opened 3 years ago

Closed 2 years ago

#5605 closed enhancement (fixed)

[PATCH] Geotagged image viewer should rotate images according to EXIF orientation tag

Reported by: anonymous Owned by: team
Priority: normal Component: Core
Version: Keywords: orientation rotate image exif
Cc:

Description

Geotagged image viewer should rotate images according to EXIF orientation tag.

Attachments (1)

ImageDisplay.java.diff (3.6 KB) - added by m.zdila@… 2 years ago.
patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by Cobra

+1

very annoying. should be rather simple to implement, I hope.

comment:2 Changed 2 years ago by m.zdila@…

Adding my vote. Thanks in advance!

comment:3 Changed 2 years ago by bastiK

Thanks for the bump, I forgot about this one...

Changed 2 years ago by m.zdila@…

patch

comment:4 Changed 2 years ago by m.zdila@…

Please check and apply my patch. I tested it with all 4 rotations. Image flipping is not implemented but AFAIK it is very uncommon. Thanks in advance.

comment:5 Changed 2 years ago by Cobra

  • Summary changed from Geotagged image viewer should rotate images according to EXIF orientation tag to [PATCH] Geotagged image viewer should rotate images according to EXIF orientation tag

comment:6 Changed 2 years ago by bastiK

I'll apply it, when merge window is open, about next We.

One minor thing: There should be a field exifOrientation in ImageEntry class and it should be initialized in GeoImageLayer.extractExif and not in ImageDisplay.run.

comment:7 Changed 2 years ago by m.zdila@…

I am examining exifOrientation in ImageDisplay.run because entry with EXIF is not available at org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages line 382. I can try to fix it if you give me a hint.

comment:8 Changed 2 years ago by bastiK

Ok, now I see the problem. Maybe add method setOrientation to ImageDisplay, then put your new exif code in ExifReader to be called from CorrelateGpxWithImages line 382. Then in GeoImageLayer.extractExif just put the line e.setOrientation(dir.getInt(ExifDirectory.TAG_ORIENTATION));.

comment:9 Changed 2 years ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

In [4241/josm]:

applied #5605 - Geotagged image viewer should rotate images according to EXIF orientation tag (patch by m.zdila, some modifications)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.