Modify

Opened 4 years ago

Last modified 4 months ago

#19442 new enhancement

add heic format support for photos

Reported by: aharvey Owned by: team
Priority: normal Milestone:
Component: Plugin Version:
Keywords: Cc:

Description

Some phones save photos as HEIC files (HEIF format). It would make it easier if JOSM would natively support these the same way as JPG files.

Attachments (0)

Change History (6)

comment:1 by stoecker, 4 years ago

Ask in Java bugtracker, not here.

comment:2 by aharvey, 4 years ago

Looks like there is a Java reader https://github.com/nokiatech/heif

Last edited 4 years ago by aharvey (previous) (diff)

comment:3 by simon04, 4 years ago

Component: CorePlugin

Drawbacks:

comment:4 by anonymous, 2 years ago

Sorry I also stumbled about this problem, as I want to use HEIF as image format, but JOSM cannot read it.
Maybe it would at least be possible to get GPS data from it?

comment:5 by taylor.smock, 2 years ago

I'm going to point you at #14361 ( https://github.com/ramSeraph/josm-webp-plugin ). If you can find a decoder for HEVC for ImageIO, you can pretty much copy that plugin and make a few changes. Please be aware of patent issues (AKA, don't use a library that (a) doesn't have all the required patent permissions and/or (b) doesn't pass patent permissions on to downstream users).

I highly doubt we will be able to use any HEVC decoder in JOSM core, purely due to patent issues. Lawsuits are not cheap.

Specifically, from wikipedia:High_Efficiency_Image_File_Format#Patent_licensing

HEIF itself is a container that may not be subject to additional royalty fees for commercial ISOBMFF licensees. Note however that Nokia also grants its patents on a royalty-free basis for non-commercial purposes.[62] When containing images and image sequences encoded in a particular format (e.g. HEVC or AVC) its use becomes subject to the licensing of patents on the coding format.[63][64][65]

The non-commercial purposes bit means that we probably could not distribute JOSM under the GPL, which makes any work on JOSM core to support the format a no-go.

Starting 2033, OSS can probably start implementing HEIF/HEVC decoding support, without worrying about patent enforcement.

wikipedia:AVIF also uses HEIF for the container format, but I'm kind of leary about supporting it in JOSM directly (non-commercial purposes).

In any case, upstream Java is probably the best place to ask for random image format support. Many newer image formats are patent encumbered, which makes it legally risky for us to use and/or implement.

comment:6 by aharvey, 4 months ago

Looks like we have an ImageIO plugin at https://github.com/gotson/NightMonkeys/tree/main/imageio-heif however EXIF is not yet supported.

This request was to make it easier to use photos taken from a Samsung phone which uses this format. As a workaround I'm running

parallel heif-convert {} {.}.jpg ::: *.heic

Last edited 4 months ago by aharvey (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to aharvey.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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