diff --git a/api/rs/slint/Cargo.toml b/api/rs/slint/Cargo.toml index d1553ad4309..8049bff0a8f 100644 --- a/api/rs/slint/Cargo.toml +++ b/api/rs/slint/Cargo.toml @@ -25,6 +25,7 @@ default = [ "backend-default", "renderer-femtovg", "renderer-software", + "image-default-formats", "accessibility", "compat-1-2", ] @@ -34,7 +35,8 @@ default = [ ## Newer patch version may put current functionality behind a new feature ## that would be enabled by default only if this feature was added. ## [More info in this blog post](https://slint.dev/blog/rust-adding-default-cargo-feature.html) -"compat-1-2" = [] +"compat-1-6" = [] +"compat-1-2" = ["compat-1-6", "image-default-formats"] "compat-1-0" = ["compat-1-2", "renderer-software"] ## Enable use of the Rust standard library. @@ -84,6 +86,10 @@ accessibility = ["i-slint-backend-selector/accessibility"] ## [HasDisplayHandle](raw_window_handle_06::HasDisplayHandle) implementation. raw-window-handle-06 = ["dep:raw-window-handle-06", "i-slint-backend-selector/raw-window-handle-06"] +## Enable all formats from the `image` crate. To increase what is supported from [`Image::load_from_path`] +## or in `@image-url`. +image-default-formats = ["i-slint-core/image-default-formats"] + #! ### Backends #! Slint needs a backend that will act as liaison between Slint and the OS. diff --git a/internal/core/Cargo.toml b/internal/core/Cargo.toml index 3bd585a5810..37896bf128d 100644 --- a/internal/core/Cargo.toml +++ b/internal/core/Cargo.toml @@ -38,6 +38,7 @@ software-renderer = ["bytemuck"] software-renderer-rotation = [] image-decoders = ["dep:image", "dep:clru"] +image-default-formats = ["image?/default-formats"] svg = ["dep:resvg", "shared-fontdb"] box-shadow-cache = []