diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-12-29 18:43:43 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-12-29 18:43:43 +0100 |
commit | 14bc7db2e07c5d1ccfb4d723c9dba395e6c93171 (patch) | |
tree | 7b00861348dedd18d3651537128bbe783dab364c /src/main.vala | |
parent | 1bf62485f701b52ae27433e3570ac24cd7da886f (diff) | |
parent | 67d142325abb0d9345baef77f00a047a7dc1eca3 (diff) |
Merge branch 'release/debian/0.32.4-1'HEADdebian/0.32.4-1master
Diffstat (limited to 'src/main.vala')
-rw-r--r-- | src/main.vala | 63 |
1 files changed, 63 insertions, 0 deletions
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")); |