Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for ISO/IEC 23008-12:2017 HEIF file format #318

Closed
arekm opened this issue May 21, 2018 · 37 comments
Closed

Please add support for ISO/IEC 23008-12:2017 HEIF file format #318

arekm opened this issue May 21, 2018 · 37 comments
Labels
request feature request or any other kind of wish

Comments

@arekm
Copy link

arekm commented May 21, 2018

Please add support for ISO/IEC 23008-12:2017 HEIF file format.

libheif (GPL) already has code to handle exif that could be inspiration
https://github.com/strukturag/libheif
src/heif_context.{h,cc}

ImageMagick, too:
https://github.com/ImageMagick/ImageMagick/blob/master/coders/heic.c

Example files:
https://trac.ffmpeg.org/ticket/6521

@clanmills
Copy link
Collaborator

Yes, I remember Apple announcing that a year or two ago.

The team have quite a lot of work in progress and we hope to release v0.27 by the end of 2018. It's probably not very difficult to deal with this request, however the existing team members already havea lot on their plate.

If you really want to see this added, we need to find a volunteer for this task. So, if you, or somebody you know, would like to volunteer, I will be happy to support and mentor your efforts.

@piponazo piponazo added the request feature request or any other kind of wish label May 27, 2018
@Viper2001
Copy link

Here is a sample of HEIC file:

https://www.dropbox.com/s/wh73l2tdszqkb31/IMG_3071.HEIC?dl=0

@1div0
Copy link
Collaborator

1div0 commented Feb 20, 2019

I've started https://github.com/1div0/exiv2/tree/HEIF already.

@D4N
Copy link
Member

D4N commented Feb 20, 2019

@1div0 Thanks for starting! Please create a pull request sooner than later (mark it [WIP] if it isn't finished yet), so that we can comment early and/or help out.

@cgilles
Copy link
Collaborator

cgilles commented Sep 28, 2019

Any progress on this file ? HEIF support is just introduced in digiKam, for the moment with supporting decoding file only. Encoding will arrive later.

https://imgur.com/JmEgGNS
https://imgur.com/nANLwLj
https://imgur.com/rMWg9Bf
https://imgur.com/H7hxiNC

HEIF/HEIC is very well documented and support in native Exif and XMP chunks.

Best

Gilles Caulier

@clanmills
Copy link
Collaborator

clanmills commented Sep 28, 2019

Yes, it's work-in-progress: #978

I've given @1div0 encouragement. I'm happy to mentor, however I don't have the bandwidth to take this onto my back. I am the release engineer for quarterly v0.27 "dots" with security and bug fixes. I'm writing a book Image Metadata and Exiv2 Architecture and will run a workshop at LGM in Rennes 28-30 May 2020. #911 I believe Luis and Dan will attend. I've invited Phil (Harvey). It would be wonderful for you to join us and meet before I retire! I'll be 70 on 2021-01-18 and pursuing the goal that Exiv2 will power into the future in the safe hands of Team Exiv2.

@cgilles
Copy link
Collaborator

cgilles commented Oct 6, 2019

I take a look in devel branch dedicated to HEIF support. This is my remarks :

1/ this code use libheif to handle metadata. This is the expected way to support new format ? Exiv2 must not be free of external dependency for this kind of feature. If yes, i know well libheif now, so i can take a look to finalize this branch if you are agree.

2/ in the branch, HEIF is annotated as read only, even if writing code is present (but not finalized certainly)

3/ IPTC chunk is annotated as available, even if IPTC is not officially supported by HEIF spec from Nokia.

https://nokiatech.github.io/heif/technical.html

Only Exif, and XMP are supported but format is open store extra metadata chunk. I commented this point to libheif as improvement :

strukturag/libheif#124 (comment)

4/ Exiv2 can play with preview image in file format. HEIF has a extra version of master image dedicated to store a "Cover" preview. libheif is not able to extract this image yet. I reported this point here:

strukturag/libheif#160

This preview image can be encoded as JPEG, HEVC, or AV1 codec.

My HEIF resume note are below :

Exif RW support : yes => can be extracted with libheif. Work perfectly in digiKam
Xmp RW support : yes => can be extracted with libheif. Work perfectly in digiKam
Icc color profile RW support : yes => can be extracted with libheif. Work perfectly in digiKam
IPTCT support : no => improvement required in libheif API
Preview support : no => => improvement required in libheif API

Best

Gilles Caulier

@1div0
Copy link
Collaborator

1div0 commented Oct 7, 2019

Bonjour++ Gilles!

Merci.

@cgilles
Copy link
Collaborator

cgilles commented Oct 7, 2019

Hi,

Point 1 has a pending response. Please take a look. If it's fine to use libheif, i can write patch to add a first version of HEIF support to Exiv2...

Gilles

@1div0
Copy link
Collaborator

1div0 commented Oct 7, 2019

Bonsoir++

I will try to finalize metadata read at first. If you have a time, please consider addition of the metadata write support as second part.

I am available via Wire @peak so we can connect better way.

@cgilles
Copy link
Collaborator

cgilles commented Oct 8, 2019

Look my libheif based code from digiKam here:

read: https://invent.kde.org/kde/digikam/blob/master/core/dplugins/dimg/heif/dimgheifloader_load.cpp

write: https://invent.kde.org/kde/digikam/blob/master/core/dplugins/dimg/heif/dimgheifloader_save.cpp

Both contains code to extract and push metadata byte-array for Exif, Xmp, ICC. Iptc is not supported for the moment.

Read is very easy. just use code in place from DK and port to Exiv2 API. It's a game of few hours to code.

Write is more complex as you need to get all chunks from original and push as well to the target without re-encoding. libheif must has the low level method for that, if not, you must ask to extend API in Github project.

About Preview, it's more complex as it's in Thumbnail multipage chunk. libheif permit to decode image i'm sure but to take raw chunk, i'm not...

Gilles

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

Hi Peter,

I created my HEIF branch in github, and my code is able to get Exif, Iptc, and Xmp. It's based originally on you branch.

And yes, Iptc is now officially supported. libheif team introduce new code in "iptc" branch following my recommendations. Look the story :

strukturag/libheif#124

I use your code branch and add libheif code base from iptc branch in Exiv2. Two reason of this :

1/ iptc libheif branch is not yet merge in master and libheif is not yet released with this code.
2/ external libheif dependency is just the hell to resolve under Windows and MacOS for the moment. libheif "make install" is just not implemented, and shared object is a mess outside Linux computer.

I do the same inside digiKam HEIF image loader plugin, as you can see here :

https://invent.kde.org/kde/digikam/tree/master/core/dplugins/dimg/heif

There is no incompatibility between GPL2 (digiKam) and GPL3 (libheif) licensing. libheif is not relevant of patents, only HEVC encoder (libx265) is problematic. Look like i also include libde265 in digiKam, as decoding is not a affected by patents. libde265, is also managed by libheif team, and has exactly the same deployment problem under non linux platforms.

In all cases, look how i introduce libheif in Exiv2. It fully isolated, and can be dropped easily later when libheif deployment problems will be resolved.

TODO :

1/ restore HEIF support as optional, as you do in your branch with a cmake option.
2/ implement write support.
3/ talk about to drop libheif dependency definitively and write a stand alone parser instead, as I do in the past for PNG, JPEG2000, and PGF.

Best

Gilles Caulier

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

Link to HEIF Image generated by digiKam from a JPEG image including Exif, Iptc, and Xmp :

https://drive.google.com/open?id=1GPI7RGlrL6uIusEfyDbmxxJeOL-9YLRE

Results with Exiv2 CLI tool :

[gilles@localhost bin]$ ./exiv2 -pe LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Reading HEIF file LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Found 3 HEIF metadata chunck
Parsing HEIF metadata chunck:Exif
Exiv2::HeifImage:: HEIF exif container found with size:6998
Parsing HEIF metadata chunck:iptc
Exiv2::HeifImage:: HEIF Iptc container found with size:259696
Parsing HEIF metadata chunck:mime
Exiv2::HeifImage:: HEIF Xmp container found with size:354154
Exif.Image.ImageWidth Long 1 3008
Exif.Image.ImageLength Long 1 2000
Exif.Image.DocumentName Ascii 7 LR.jpg
Exif.Image.ImageDescription Ascii 44 Den gamle og trofaste Massey'en til fadern.
Exif.Image.Make Ascii 18 NIKON CORPORATION
Exif.Image.Model Ascii 10 NIKON D40
Exif.Image.XResolution Rational 1 240/1
Exif.Image.YResolution Rational 1 240/1
Exif.Image.ResolutionUnit Short 1 2
Exif.Image.Software Ascii 36 digiKam-0.10.0-beta5 (rev.: 868115)
Exif.Image.DateTime Ascii 20 2009:06:20 23:34:22
Exif.Image.Artist Ascii 17 Anders Ronningen
Exif.Image.ExifTag Long 1 340
Exif.Photo.ExposureTime Rational 1 1/100
Exif.Photo.FNumber Rational 1 5/1
Exif.Photo.ExposureProgram Short 1 0
Exif.Photo.ISOSpeedRatings Short 1 400
Exif.Photo.ExifVersion Undefined 4 48 50 50 49
Exif.Photo.DateTimeOriginal Ascii 20 2007:07:28 19:42:38
Exif.Photo.DateTimeDigitized Ascii 20 2007:07:28 19:42:38
Exif.Photo.ShutterSpeedValue SRational 1 6643856/1000000
Exif.Photo.ApertureValue Rational 1 4643856/1000000
Exif.Photo.ExposureBiasValue SRational 1 0/6
Exif.Photo.MaxApertureValue Rational 1 45/10
Exif.Photo.MeteringMode Short 1 5
Exif.Photo.LightSource Short 1 0
Exif.Photo.Flash Short 1 0
Exif.Photo.FocalLength Rational 1 380/10
Exif.Photo.UserComment Undefined 51 charset="Ascii" Den gamle og trofaste Massey'en til fadern.
Exif.Photo.SubSecTimeOriginal Ascii 3 20
Exif.Photo.SubSecTimeDigitized Ascii 3 20
Exif.Photo.PixelXDimension Long 1 3008
Exif.Photo.PixelYDimension Long 1 2000
Exif.Photo.SensingMethod Short 1 2
Exif.Photo.FileSource Undefined 1 3
Exif.Photo.SceneType Undefined 1 1
Exif.Photo.CustomRendered Short 1 0
Exif.Photo.ExposureMode Short 1 0
Exif.Photo.WhiteBalance Short 1 0
Exif.Photo.DigitalZoomRatio Rational 1 1/1
Exif.Photo.FocalLengthIn35mmFilm Short 1 57
Exif.Photo.SceneCaptureType Short 1 0
Exif.Photo.GainControl Short 1 1
Exif.Photo.Contrast Short 1 0
Exif.Photo.Saturation Short 1 0
Exif.Photo.Sharpness Short 1 0
Exif.Photo.SubjectDistanceRange Short 1 0
Exif.Photo.ImageUniqueID Ascii 33 D162625009E4DB0461C3968E0F1E2910
Exif.Thumbnail.Compression Short 1 6
Exif.Thumbnail.JPEGInterchangeFormat Long 1 998
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 6000
[gilles@localhost bin]$

// ------------------------------------------------------------------------------------------------

[gilles@localhost bin]$ ./exiv2 -pi LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Reading HEIF file LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Found 3 HEIF metadata chunck
Parsing HEIF metadata chunck:Exif
Exiv2::HeifImage:: HEIF exif container found with size:6998
Parsing HEIF metadata chunck:iptc
Exiv2::HeifImage:: HEIF Iptc container found with size:259696
Parsing HEIF metadata chunck:mime
Exiv2::HeifImage:: HEIF Xmp container found with size:354154
Iptc.Application2.RecordVersion Short 1 2
Iptc.Application2.Urgency String 1 4
Iptc.Application2.Keywords String 7 Fosstun
Iptc.Application2.Keywords String 6 Places
Iptc.Application2.Keywords String 5 Torpa
Iptc.Application2.Byline String 16 Anders Ronningen
Iptc.Application2.Caption String 43 Den gamle og trofaste Massey'en til fadern.
Iptc.Application2.Preview Undefined 259558 (Binary value suppressed)
Iptc.Application2.PreviewFormat Short 1 11
Iptc.Application2.PreviewVersion Short 1 1
[gilles@localhost bin]$

// -------------------------------------------------------------------------------------------------

[gilles@localhost bin]$ ./exiv2 -px LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Reading HEIF file LR.heic
Exiv2::HeifImage::isHeifType() = 1
Exiv2::HeifImage::readMetadata: Found 3 HEIF metadata chunck
Parsing HEIF metadata chunck:Exif
Exiv2::HeifImage:: HEIF exif container found with size:6998
Parsing HEIF metadata chunck:iptc
Exiv2::HeifImage:: HEIF Iptc container found with size:259696
Parsing HEIF metadata chunck:mime
Exiv2::HeifImage:: HEIF Xmp container found with size:354154
Xmp.xmp.CreatorTool XmpText 25 Adobe Photoshop Lightroom
Xmp.xmp.Rating XmpText 1 3
Xmp.xmp.ModifyDate XmpText 25 2009-06-20T23:34:22+02:00
Xmp.xmp.CreateDate XmpText 28 2007-07-28T19:42:38.20+02:00
Xmp.xmp.MetadataDate XmpText 25 2008-12-15T21:11:40+01:00
Xmp.exif.ExifVersion XmpText 4 2.21
Xmp.exif.ExposureTime XmpText 5 1/100
Xmp.exif.ShutterSpeedValue XmpText 15 1/100 s
Xmp.exif.FNumber XmpText 3 F5
Xmp.exif.ApertureValue XmpText 15 F5
Xmp.exif.ExposureProgram XmpText 1 Not defined
Xmp.exif.DateTimeOriginal XmpText 28 2007-07-28T19:42:38.20+02:00
Xmp.exif.DateTimeDigitized XmpText 28 2007-07-28T19:42:38.20+02:00
Xmp.exif.ExposureBiasValue XmpText 3 0 EV
Xmp.exif.MaxApertureValue XmpText 5 45/10
Xmp.exif.MeteringMode XmpText 1 Multi-segment
Xmp.exif.LightSource XmpText 1 Unknown
Xmp.exif.FocalLength XmpText 6 38.0 mm
Xmp.exif.SensingMethod XmpText 1 One-chip color area
Xmp.exif.FileSource XmpText 1 Digital still camera
Xmp.exif.SceneType XmpText 1 Directly photographed
Xmp.exif.FocalLengthIn35mmFilm XmpText 2 57
Xmp.exif.CustomRendered XmpText 1 Normal process
Xmp.exif.ExposureMode XmpText 1 Auto
Xmp.exif.WhiteBalance XmpText 1 Auto
Xmp.exif.SceneCaptureType XmpText 1 Standard
Xmp.exif.GainControl XmpText 1 Low gain up
Xmp.exif.Contrast XmpText 1 Normal
Xmp.exif.Saturation XmpText 1 Normal
Xmp.exif.Sharpness XmpText 1 Normal
Xmp.exif.SubjectDistanceRange XmpText 1 Unknown
Xmp.exif.DigitalZoomRatio XmpText 3 1/1
Xmp.exif.ImageUniqueID XmpText 32 D162625009E4DB0461C3968E0F1E2910
Xmp.exif.PixelXDimension XmpText 4 3008
Xmp.exif.PixelYDimension XmpText 4 2000
Xmp.exif.ISOSpeedRatings XmpSeq 1 400
Xmp.exif.Flash XmpText 0 type="Struct"
Xmp.exif.Flash/exif:Fired XmpText 5 False
Xmp.exif.Flash/exif:Return XmpText 1 0
Xmp.exif.Flash/exif:Mode XmpText 1 0
Xmp.exif.Flash/exif:Function XmpText 5 False
Xmp.exif.Flash/exif:RedEyeMode XmpText 5 False
Xmp.exif.UserComment LangAlt 1 lang="x-default" Den gamle og trofaste Massey'en til fadern.
Xmp.photoshop.LegacyIPTCDigest XmpText 32 F2DA32475AC9C707CB33A731A6870DE3
Xmp.photoshop.Urgency XmpText 1 4
Xmp.tiff.Make XmpText 17 NIKON CORPORATION
Xmp.tiff.Model XmpText 9 NIKON D40
Xmp.tiff.ImageWidth XmpText 4 3008
Xmp.tiff.ImageLength XmpText 4 2000
Xmp.tiff.XResolution XmpText 5 240
Xmp.tiff.YResolution XmpText 5 240
Xmp.tiff.ResolutionUnit XmpText 1 inch
Xmp.crs.Version XmpText 3 5.3
Xmp.crs.WhiteBalance XmpText 7 As Shot
Xmp.crs.IncrementalTemperature XmpText 1 0
Xmp.crs.IncrementalTint XmpText 1 0
Xmp.crs.Exposure XmpText 4 0.00
Xmp.crs.Shadows XmpText 1 0
Xmp.crs.Brightness XmpText 1 0
Xmp.crs.Contrast XmpText 1 0
Xmp.crs.Saturation XmpText 1 0
Xmp.crs.Sharpness XmpText 1 0
Xmp.crs.LuminanceSmoothing XmpText 1 0
Xmp.crs.ColorNoiseReduction XmpText 1 0
Xmp.crs.ChromaticAberrationR XmpText 1 0
Xmp.crs.ChromaticAberrationB XmpText 1 0
Xmp.crs.VignetteAmount XmpText 1 0
Xmp.crs.ShadowTint XmpText 1 0
Xmp.crs.RedHue XmpText 1 0
Xmp.crs.RedSaturation XmpText 1 0
Xmp.crs.GreenHue XmpText 1 0
Xmp.crs.GreenSaturation XmpText 1 0
Xmp.crs.BlueHue XmpText 1 0
Xmp.crs.BlueSaturation XmpText 1 0
Xmp.crs.FillLight XmpText 1 0
Xmp.crs.Vibrance XmpText 1 0
Xmp.crs.HighlightRecovery XmpText 1 0
Xmp.crs.Clarity XmpText 1 0
Xmp.crs.Defringe XmpText 1 0
Xmp.crs.HueAdjustmentRed XmpText 1 0
Xmp.crs.HueAdjustmentOrange XmpText 1 0
Xmp.crs.HueAdjustmentYellow XmpText 1 0
Xmp.crs.HueAdjustmentGreen XmpText 1 0
Xmp.crs.HueAdjustmentAqua XmpText 1 0
Xmp.crs.HueAdjustmentBlue XmpText 1 0
Xmp.crs.HueAdjustmentPurple XmpText 1 0
Xmp.crs.HueAdjustmentMagenta XmpText 1 0
Xmp.crs.SaturationAdjustmentRed XmpText 1 0
Xmp.crs.SaturationAdjustmentOrange XmpText 1 0
Xmp.crs.SaturationAdjustmentYellow XmpText 1 0
Xmp.crs.SaturationAdjustmentGreen XmpText 1 0
Xmp.crs.SaturationAdjustmentAqua XmpText 1 0
Xmp.crs.SaturationAdjustmentBlue XmpText 1 0
Xmp.crs.SaturationAdjustmentPurple XmpText 1 0
Xmp.crs.SaturationAdjustmentMagenta XmpText 1 0
Xmp.crs.LuminanceAdjustmentRed XmpText 1 0
Xmp.crs.LuminanceAdjustmentOrange XmpText 1 0
Xmp.crs.LuminanceAdjustmentYellow XmpText 1 0
Xmp.crs.LuminanceAdjustmentGreen XmpText 1 0
Xmp.crs.LuminanceAdjustmentAqua XmpText 1 0
Xmp.crs.LuminanceAdjustmentBlue XmpText 1 0
Xmp.crs.LuminanceAdjustmentPurple XmpText 1 0
Xmp.crs.LuminanceAdjustmentMagenta XmpText 1 0
Xmp.crs.SplitToningShadowHue XmpText 1 0
Xmp.crs.SplitToningShadowSaturation XmpText 1 0
Xmp.crs.SplitToningHighlightHue XmpText 1 0
Xmp.crs.SplitToningHighlightSaturation XmpText 1 0
Xmp.crs.SplitToningBalance XmpText 1 0
Xmp.crs.ParametricShadows XmpText 1 0
Xmp.crs.ParametricDarks XmpText 1 0
Xmp.crs.ParametricLights XmpText 1 0
Xmp.crs.ParametricHighlights XmpText 1 0
Xmp.crs.ParametricShadowSplit XmpText 2 25
Xmp.crs.ParametricMidtoneSplit XmpText 2 50
Xmp.crs.ParametricHighlightSplit XmpText 2 75
Xmp.crs.SharpenRadius XmpText 4 +1.0
Xmp.crs.SharpenDetail XmpText 2 25
Xmp.crs.SharpenEdgeMasking XmpText 1 0
Xmp.crs.PostCropVignetteAmount XmpText 1 0
Xmp.crs.ConvertToGrayscale XmpText 5 False
Xmp.crs.ToneCurveName XmpText 6 Linear
Xmp.crs.CameraProfile XmpText 8 Embedded
Xmp.crs.CameraProfileDigest XmpText 32 54650A341B5B5CCAE8442D0B43A92BCE
Xmp.crs.HasSettings XmpText 4 True
Xmp.crs.HasCrop XmpText 5 False
Xmp.crs.AlreadyApplied XmpText 4 True
Xmp.crs.ToneCurve XmpSeq 2 0, 0, 255, 255
Xmp.digiKam.Preview XmpText 346080 /9j/4AAQSkZJRgABAQEAbABrAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCANTBQADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2
...
Rz+nEtDqEZJKBtmM9j2PrUd/aQW7KYk2ZIBAJwRuI6dKKKt7E9SbTbaK7lRZ1LhYnYfMRggHFangQ+d4hhikAZDEzlSOM4PNFFY9zR/CJrNvDbSGSGNUY3WzIHbPSsuyXzVu97yNsL7SZG4wfrRRWi6kMtaa7XWtC1uD5sAcHZJ8w6H1rf1K2gtdOUwQxxlplQ7VA+UnpRRUvYa3KU9vDO0kMkSNH9pxgqOPl7elZsqJHBpkiKFZ5H3beAdp446UUVXQT3IPtM0upXG9yfkI/Q/4CsKwup0vmgWQ+VuxsPI/WiirjsDNe5up44iiSsqtIQcHqK2fDmlWN5c28txbI7ndknPOAMUUVL2BktzGhvSu0YdzuwOtZF4oi1e2gXJifaWVjuzk89aKKHsS9j//2Q==
Xmp.digiKam.ImageHistory XmpText 318




Xmp.digiKam.ImageUniqueID XmpText 64 ca3886c96e6ee1b6edadb251abd21631e5844b4bf7206dff5dd4f51811f96335
Xmp.dc.creator XmpSeq 1 Anders Ronningen
Xmp.dc.description LangAlt 1 lang="x-default" Den gamle og trofaste Massey'en til fadern.
Xmp.dc.subject XmpBag 3 Fosstun, Places, Torpa
Xmp.lr.hierarchicalSubject XmpBag 1 Places|Torpa|Fosstun
[gilles@localhost bin]$

Gilles Caulier

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

Link to my branch :

https://github.com/cgilles/exiv2

Gilles Caulier

@1div0
Copy link
Collaborator

1div0 commented Oct 12, 2019

@cgilles

Thank you very much for your efforts. I will have a look l8r today.

Merci.

Post Scriptum: have a nice weekend!

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

With this commit HEIF option at configuration time is back :

cgilles@6b7b6a2

I also print this option state in cmake configuration resume.

Gilles Caulier

@phako
Copy link
Contributor

phako commented Oct 12, 2019

3/ talk about to drop libheif dependency definitively and write a stand alone parser instead, as I do in the past for PNG, JPEG2000, and PGF.

What exact benefit you you think you will gain from writing your own format parser?

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

No gain : more time to spare on this task, but left libheif source code.

Again, as i said this point must be talk. If libheif is a problem to left in Exiv2, or to add as an external dependency, this is the way to go. Else, we can stay like this...

Gilles Caulier

@1div0
Copy link
Collaborator

1div0 commented Oct 12, 2019

Just because of the mess with dynamic linked libraries in some operating systems, it does not make any $€n$€ to reinvent better circular transportation device.

libheif is the best, as it is the only one in this space.

Cheers.

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

Sûre, but there is another point where I’m not sure : libheif will be able to modify metadata chunks without to re-encode image data ?

@1div0
Copy link
Collaborator

1div0 commented Oct 12, 2019

@farindk What do you think about the latest comments above and below?

Danke schön.

@phako
Copy link
Contributor

phako commented Oct 12, 2019

Sûre, but there is another point where I’m not sure : libheif will be able to modify metadata chunks without to re-encode image data ?

If that's the case, then libheif should be fixed, IMHO. Though I really doubt it. I'd assume it only needs to remux the isomp4 container worst-case.

@cgilles
Copy link
Collaborator

cgilles commented Oct 12, 2019

I just open this file in libheif project, just to be sure... Wait and see :

strukturag/libheif#164

Gilles Caulier

@cgilles
Copy link
Collaborator

cgilles commented Oct 14, 2019

Voilà, this is what i suspected : strukturag/libheif#105

It's not yet possible to modify an existing HEIF file without to re-encode with libheif. But the problem still open.

I also write test code to try to backport Exif/Ipc/xmp from a JPEG image to an existing HEIF file, and it's break the file structure.

I will report and talk about this problem with libheif team...

Gilles Caulier

@phako
Copy link
Contributor

phako commented Oct 14, 2019

May I suggest a two-step approach and implement read access first with this issue, finish that and implement write access later?

@cgilles
Copy link
Collaborator

cgilles commented Oct 14, 2019

Well code to update metadata in HEIF with libheif is already on my computer. So I will write an unit test for libheif to test this kind of operations and wait than libheif team patch the library to make the changes.

Depending of the Exiv2 plan to deploy next release, the current code to read all metadata is already fine to be used in production. I test well with digiKam, and no side effect is visible from client side.

Let's me hear if you want a first PR from my Exiv2 branch with the read only version of HEIF support.

Gilles Caulier

@cryptomilk
Copy link
Collaborator

A ISO/IEC 23008-12:2017 encoder/decoder will be required for Canon CR3 too. So the question is if it makes sense to pull in libheif. You probably have to implement a encoder/decoder anyway.

@clanmills
Copy link
Collaborator

The proposal #1066 to implement this was met with overwhelming opposition from the community. Until the legal challenges are resolved, we will not get involved with HEIF.

@clanmills
Copy link
Collaborator

Topic: Exiv2 and ISOBMFF Support
Time: Jun 14, 2020 13:00 London

Join Zoom Meeting
https://us02web.zoom.us/j/82136730279?pwd=M3hCbll4cWN3ellJd2pCZkxjVEx3Zz09

Meeting ID: 821 3673 0279
Password: 1fDNUV

@AurelC2G
Copy link

Tried to join earlier, waited for the host to start the meeting for a while, but but looks like no-one was here?

@boardhead
Copy link
Collaborator

I think maybe you had the wrong time zone. The meeting started 2.5 hours before you posted this comment, and was only 40 minutes in length.

@AurelC2G
Copy link

I did join the meeting on time (well, 3 minutes late) and commented much later. Guess the host just didn't notice I was waiting to be let in.

@clanmills
Copy link
Collaborator

@AurelC2G I didn't see you in the wait list. About 30 minutes into the meeting, I realised that Paulio was waiting and he joined us for the last 10 minutes. I can't explain why you didn't appear in that list.

We were joined by an Australian called Dave and he emailed his CV afterwards and has offered to be involved with implementation and testing.

It was agreed at the meeting that the current priority for my time is to finish my book: "Image Metadata and Exiv2 Engineering". https://clanmills.com/exiv2/book/ It is too late to develope ISOBMFF support in Exiv2 v0.27.3 because it's at RC2 with no further changes intended before it ships on 2020-06-30.

I have offered Team Exiv2 to do one final release of Exiv2 before I retire permanently. If they ask me to release 0.28, that's what I will do and it's up to the team to decide what to do about ISOBMFF.

If my final release is Exiv2 v0.27.4, I will develop ISOBMFF support and get a legal opinion before releasing the code. I won't even include code in a pre-release without legal support. Team Exiv2 may or may not include my implementation in Exiv2 0.28.

One of the matters we discussed was the underlying reluctance of Dan and Jens to support this project. Regrettably they didn't attend the meeting. Dan has said to be several times that he is concerned that, while Exiv2 is unlikely to be sued, we could be exposing our users to legal challenges. For that reason why I have offered to get legal assistance before publishing any code involving ISOBMFF.

@phako
Copy link
Contributor

phako commented Jun 14, 2020

Yes, I fell asleep in the afternoon and missed the meeting, sorry about that. But it seems I did not get my point through in the discussion.

I'm perfectly happy with you supporting all that.

What I wanted to say is that some of the algorithms and whatnots regarding HEIF, AVIF, ISOBMFF are and or were patent encumbered and mostly are not free as in speech. Henceforth you should make them opt-out for the build for those who care or have to care about those kind of things.

@clanmills
Copy link
Collaborator

clanmills commented Jun 14, 2020

Yes, I'll make it a build option. Something like -DEXIV2_ENABLE_ISOBMFF={On|Off} I'm not planning to work on this any time soon, and possibly never! We'll see. I'm having a lot of fun writing my book. I totally conquered the TiffVisitor last week and expect to finally understand Dave Coffin's DCraw CRW (and other Canon format) parser this week.

@johnny-bit
Copy link

@phako - none of the patents in HEIF, AVIF and ISOBMFF for that matter (at least those that I've seen) thouch any exif-related data. AVIF is an open standard using open codecs to store info in HEIF-compatible way. As for ISOBMFF, according to standard, it's functionally identical to JPEG2000. Aaaand since nobody raised ANY issue ever about reading exif data from JPEG2k I have no idea why anybody would raise issue about ISOBMFF-based files.

@phako
Copy link
Contributor

phako commented Jun 17, 2020

@johnny-bit that's just plain bikeshedding now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request feature request or any other kind of wish
Projects
None yet
Development

No branches or pull requests