Adds AVIF support

* This adds a new type AVIF to the supported type list if libvips >= 8.9.0
 * Calls libheif through libvips with the AV1 compression set to save AVIF images.
This commit is contained in:
Lars Fronius 2020-10-10 10:59:35 +02:00
parent 4f683f98d8
commit 83c14048e0
No known key found for this signature in database
GPG key ID: 9799DF92255C2D0C
9 changed files with 86 additions and 9 deletions

View file

@ -30,6 +30,8 @@ const (
MAGICK
// HEIF represents the HEIC/HEIF/HVEC image type
HEIF
// AVIF represents the AVIF image type.
AVIF
)
var (
@ -48,6 +50,7 @@ var ImageTypes = map[ImageType]string{
SVG: "svg",
MAGICK: "magick",
HEIF: "heif",
AVIF: "avif",
}
// imageMutex is used to provide thread-safe synchronization