davidbyttow / govips

A lightning fast image processing and resizing library for Go
MIT License
1.28k stars 199 forks source link

Could we add a Bitdepth parameter to HIEF + AVIF export params? #313

Closed AttilaTheFun closed 1 year ago

AttilaTheFun commented 2 years ago

With the release of iOS 16 and soon macOS Ventura, Apple platforms will finally support AVIF. (AV1 support for videos is still not available yet sadly.) See: https://caniuse.com/avif

I'm interested in using AVIF for high bit depth images on these devices. In December last year, libvips added support for 8/10/12 bit HEIC and AVIF load and save: https://github.com/libvips/libvips/pull/2596

However, AFAICT neither of the govips versions of the export parameters take the bitdepth argument. Would it be possible to add support for this to govips? I could create a PR if I could get some code pointers. I can see the export params structs but I'm not entirely sure what else needs to happen to pass that to the underlying libvips.

AttilaTheFun commented 1 year ago

My PR fixed this issue.