John Cupitt
John Cupitt
... so I think I don't have a good understanding of what's happening. I might go for a cycle ride and see if anything pops into my head.
Sure, happy to help.
Sorry @john-parton, I reviewed now.
## Proposal It looks like support for the extra gain map image could be added pretty easily to the libvips JPEG reader. We could just add an image-valued metadata item...
For libvips it'd be best to transform to a HDR float image on load, maybe with a new operation called `ultrahdr2float` (for example). libvips HDR uses the `scRGB` interpretation tag...
We could leave the gain map image as metadata on the scRGB. It's easy to recover the SDR from that, if necessary. However, many operations on the scRGB image (eg....
You can use the gain map as the exponent. It won't match the original SDR + gain map, of course, but it would be a correct representation of the HDR....
It looks like I've hit a blocker: putting a palette into VipsQuantiseResult using vips__quantise_image_quantize_fixed() seems to renumber the palette. I think we need a supported way to set the palette...
> Yeah well that's the issue. In that case just treating it as an SDR image would probably be better... libvips already has quite a bit of HDR support (it...
To show the problem, try this: 1. Generate the palette with `vips palette astronauts.png palette.v` 2. Use the palette to create an index image with `vips dither astronauts.png x.png palette.v`...