h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
https://fly.io/docs/app-guides/run-a-global-image-service/
MIT License
5.5k stars 455 forks source link

Added support for saving as AVIF #386

Open ItalyPaleAle opened 2 years ago

ItalyPaleAle commented 2 years ago

Added support for converting images to AVIF. This adds avif as a supported type.

Some notes:

  1. Generating AVIF images can be very slow, especially for large ones. I mean, it can take multiple seconds or minutes-but the results are great.
  2. There's currently a bug in libheif that makes the app crash when saving images to HEIF if running on ARM64: https://github.com/strukturag/libheif/issues/608

If the two things above are an issue, I can make AVIF support optional by adding a flag.

(For some reason, the formatter on my machine re-formatted some code blocks and caused a lot of lines to be changed and removed some whitespace... if that's not desired, I can try again and see how I can un-do the formatting changes)

rluisr commented 1 year ago

+1

suntong commented 9 months ago

AVIF support is warmly welcome, and I badly need it.

Hope this PR can be taken soon...

cromefire commented 8 months ago

@h2non Sorry for the ping, but did you maybe overlook this or so, as this has been open for almost 2 years now with no feedback (and I've seen you still merge new PRs within a few weeks or so). This would be needed for good AVIF support for Nextcloud...

suntong commented 8 months ago

I couldn't wait so I merge it myself and together with an bunch of other PRs, which is now 11 commits ahead of h2non/imaginary:master -- https://github.com/suntong/imaginary/tree/dev