From f5a0cee8ccecc7b6c6c2d8e9fb6f6eecd53531fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 17 Dec 2023 19:58:04 +0100 Subject: New upstream version 0.32.4 --- src/main.vala | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'src/main.vala') diff --git a/src/main.vala b/src/main.vala index 32e3d83..d07b7f5 100644 --- a/src/main.vala +++ b/src/main.vala @@ -205,6 +205,67 @@ void library_exec(string[] mounts) { run_system_pictures_import(); } + bool heif = false; + bool jxl = false; + bool png = false; + bool tiff = false; + bool avif = false; + bool bmp = false; + bool gif = false; + + var formats = Gdk.Pixbuf.get_formats(); + foreach (var format in formats) { + if ("image/heif" in format.get_mime_types()) { + heif = true; + } + if ("image/jxl" in format.get_mime_types()) { + jxl = true; + } + if ("image/png" in format.get_mime_types()) { + png = true; + } + if ("image/tiff" in format.get_mime_types()) { + tiff = true; + } + if ("image/avif" in format.get_mime_types()) { + avif = true; + } + if ("image/bmp" in format.get_mime_types()) { + bmp = true; + } + if ("image/gif" in format.get_mime_types()) { + gif = true; + } + } + + bool can_read_bmff = false; + Bytes b = null; + try { + b = GLib.resources_lookup_data("/org/gnome/Shotwell/misc/canary.avif", GLib.ResourceLookupFlags.NONE); + } catch (Error err) { + error("Failed to look up mandatory resource: %s", err.message); + } + + try { + var m = new GExiv2.Metadata(); + m.open_buf(b.get_data()); + can_read_bmff = true; + } catch (Error err) { + // Do nothing + } + + message("Supported codecs...."); + message(" WEBP : yes, builtin"); + message(" RAW : yes, builtin"); + message(" CR3 : %s", can_read_bmff ? "yes" : "no"); + message(" JPEG : yes, gdk-pixbuf"); + message(" PNG : %s, gdk-pixbuf", png ? "yes" : "no"); + message(" GIF : %s, gdk-pixbuf", gif ? "yes" : "no"); + message(" TIFF : %s, gdk-pixbuf", tiff ? "yes" : "no"); + message(" JPEG XL: %s, gdk-pixbuf, %s meta-data", jxl ? "yes" : "no", can_read_bmff ? "yes" : "no"); + message(" AVIF : %s, gdk-pixbuf, %s meta-data", avif ? "yes" : "no", can_read_bmff ? "yes" : "no"); + message(" HEIF : %s, gdk-pixbuf, %s meta-data", heif ? "yes" : "no", can_read_bmff ? "yes" : "no"); + debug("%lf seconds to Gtk.main()", startup_timer.elapsed()); Application.get_instance().start(); @@ -405,6 +466,8 @@ void main(string[] args) { return; } + typeof(DismissableTextView).ensure(); + if (CommandlineOptions.browse_profiles) { var window = new Gtk.Dialog(); window.set_title (_("Choose Shotwell's profile")); -- cgit v1.2.3