Opened 5 years ago
Last modified 10 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 , 5 years ago
comment:3 by , 4 years ago
Component: | Core → Plugin |
---|
Drawbacks:
- no Maven artifact published – https://mvnrepository.com/search?q=heif
- dubious Nokia High-Efficiency Image File Format (HEIF) License – https://github.com/nokiatech/heif/blob/master/LICENSE.TXT (who can tell this is compatible with GPL)
comment:4 by , 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 , 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 , 10 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
Ask in Java bugtracker, not here.