Skip to content

Apple iPhone HDR support (gain maps in jpeg) #2944

@VityaSchel

Description

@VityaSchel

Hello, I tried compiling libavif from source with libxml2 on macos and got it to enable --qgain-map option but avifenc still does not recognize iphone's gain maps and prints "Gain map : Absent". I tried tinkering with avifgainmaputil for a few hours but it does not recognize apple's gain maps at all. I found this library https://github.com/grapeot/AppleJPEGGainMap that perfectly extracts grayscale gain map as a separate file. Since iPhone stores gain map at 0.5x resolution I also had to resize it to size of the hdr source image. Still, avifgainmaputil couldn't produce a proper image that would display both in unsupported browsers (firefox) and hdr supported browsers (safari, chrome).

Please add native support for apple's gain maps to avifenc! it would make my life so much easier since I wouldn't have to do some dark magic with tens of libraries to just transfer hdr from jpeg to avif :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions