mirror of
https://github.com/hyprwm/hyprgraphics.git
synced 2026-05-05 19:17:59 +02:00
error when loading AVIF from buffer w/o support
This commit is contained in:
parent
72c6c6448f
commit
4aafc47176
1 changed files with 5 additions and 0 deletions
|
|
@ -21,8 +21,13 @@ Hyprgraphics::CImage::CImage(const std::span<uint8_t>& data, eImageFormat format
|
|||
CAIROSURFACE = PNG::createSurfaceFromPNG(data);
|
||||
mime = "image/png";
|
||||
} else if (format == eImageFormat::IMAGE_FORMAT_AVIF) {
|
||||
#ifndef HEIF_FOUND
|
||||
lastError = "hyprgraphics compiled without HEIF support";
|
||||
return;
|
||||
#else
|
||||
CAIROSURFACE = AVIF::createSurfaceFromAvif(data);
|
||||
mime = "image/avif";
|
||||
#endif
|
||||
} else {
|
||||
lastError = "Currently only PNG and AVIF images are supported for embedding";
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue