From 5b7b3b1dfd5ce7c275881098310667b09562ad27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 11 Nov 2024 12:27:53 +0100 Subject: New upstream version 0.32.10 --- src/photos/WebPSupport.vala | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/photos') diff --git a/src/photos/WebPSupport.vala b/src/photos/WebPSupport.vala index b467b24..543c889 100644 --- a/src/photos/WebPSupport.vala +++ b/src/photos/WebPSupport.vala @@ -209,8 +209,18 @@ private class WebpReader : PhotoFileReader { uint8[] buffer; FileUtils.get_data(this.get_filepath(), out buffer); + var features = WebP.BitstreamFeatures(); + WebP.GetFeatures(buffer, out features); + + if (features.has_animation) { + throw new IOError.INVALID_DATA("Animated WebP files are not yet supported"); + } + int width, height; var pixdata = WebP.DecodeRGBA(buffer, out width, out height); + if (pixdata == null) { + throw new IOError.INVALID_DATA("Failed to decode WebP file"); + } pixdata.length = width * height * 4; return new Gdk.Pixbuf.from_data(pixdata, Gdk.Colorspace.RGB, true, 8, width, height, width * 4); -- cgit v1.2.3