Modify

Opened 14 years ago

Closed 14 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 Milestone:
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 *Martin* 14 years ago.
patch

Download all attachments as: .zip

Change History (10)

comment:1 by Cobra, 14 years ago

+1

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

comment:2 by *Martin*, 14 years ago

Adding my vote. Thanks in advance!

comment:3 by bastiK, 14 years ago

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

by *Martin*, 14 years ago

Attachment: ImageDisplay.java.diff added

patch

comment:4 by *Martin*, 14 years ago

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 by Cobra, 14 years ago

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

comment:6 by bastiK, 14 years ago

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 by *Martin*, 14 years ago

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 by bastiK, 14 years ago

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 by bastiK, 14 years ago

Resolution: fixed
Status: newclosed

In [4241/josm]:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.