From 56e7abdad8c24f0487299a38a2dcee67dd3b7bdd Mon Sep 17 00:00:00 2001 From: Alvin Date: Sat, 21 Nov 2026 00:55:39 +0100 Subject: [PATCH] j --- Cargo.lock | 2115 ++++++++++++++++++++++++++++++++- Cargo.toml | 2 + README.md | 95 +- examples/generate_samples.rs | 46 + src/main.rs | 1000 ++++++++++------ test_images/test_image_1.jpg | Bin 53 -> 7246 bytes test_images/test_image_2.png | Bin 53 -> 4875 bytes test_images/test_image_3.bmp | Bin 53 -> 614522 bytes test_images/test_image_4.gif | Bin 53 -> 2360 bytes test_images/test_image_5.tiff | Bin 54 -> 614602 bytes test_images/test_image_6.webp | Bin 54 -> 480 bytes 11 files changed, 2780 insertions(+), 478 deletions(-) create mode 100644 examples/generate_samples.rs diff --git a/Cargo.lock b/Cargo.lock index 151e6d6..f1bd345 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,70 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "accesskit" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e883d1d28c5fd5568c79ed2d2bd48d9f2fd3945c8974ed0f53690ceddb051be" +dependencies = [ + "uuid", +] + [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.5.1" @@ -26,11 +84,55 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "bumpalo" +version = "3.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" + [[package]] name = "bytemuck" version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] [[package]] name = "byteorder" @@ -38,18 +140,139 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + [[package]] name = "cfg-if" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "color" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf" +dependencies = [ + "bytemuck", +] + [[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "crc32fast" version = "1.5.5" @@ -90,12 +313,229 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "libc", + "objc2 0.6.5", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "ecolor" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31bcbef0d4263a63eb32c4834e5d711613035ce1333468e107d928923e21e6e2" +dependencies = [ + "bytemuck", + "emath", +] + +[[package]] +name = "eframe" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c5642501a65ca657d05f00c643a5c14ff2346cb3818032bfe23d58e1f8e5f84" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-winit", + "egui_glow", + "glow", + "glutin", + "glutin-winit", + "image 0.25.10", + "js-sys", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "profiling", + "raw-window-handle", + "send_wrapper", + "static_assertions", + "wasm-bindgen", + "web-sys", + "web-time", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9144f49b7a28b5f395d3147e325b4fe3e77ba686eac11d1bdf0a7da3f375f" +dependencies = [ + "accesskit", + "ahash", + "bitflags 2.13.2", + "emath", + "epaint", + "itertools", + "log", + "nohash-hasher", + "profiling", + "smallvec", + "unicode-segmentation", + "web-sys", +] + +[[package]] +name = "egui-winit" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e449f4c4a2a60c7ccb4ba7fa4078417bfe1f9ddc03b5e05ce75748e33a70de" +dependencies = [ + "block2 0.6.2", + "egui", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", + "profiling", + "raw-window-handle", + "web-time", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9275ca5cc35a6b7c94e0e8cedf22542f66cb0cf45ed8ab2657c78ff49fec7268" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "profiling", +] + [[package]] name = "either" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" +[[package]] +name = "emath" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73ce90f54750be8672c02be0743fe47530e6f251e066f0ee2869b59eb297af5" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "epaint" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97bac86ae3dde93fc3951e790951caea739ff39a6c89d909cdaf1d9278dbb1bd" +dependencies = [ + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "font-types", + "harfrust", + "log", + "nohash-hasher", + "parking_lot", + "profiling", + "self_cell", + "skrifa", + "smallvec", + "unicode-general-category", + "unicode-properties", + "unicode-segmentation", + "vello_cpu", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc1cc505827f4c23eedc297975a0fd038268d41293f389dd8ff3b574aefab19" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + [[package]] name = "exr" version = "1.74.3" @@ -121,6 +561,18 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fearless_simd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + [[package]] name = "flate2" version = "1.1.11" @@ -132,6 +584,83 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + [[package]] name = "gif" version = "0.13.3" @@ -142,6 +671,107 @@ dependencies = [ "weezl", ] +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glifo" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282a26c1e23de04bdab3e34a21b6f877a479b96737792516b9b8b8f69b6661be" +dependencies = [ + "bytemuck", + "foldhash", + "hashbrown", + "log", + "peniko", + "skrifa", + "smallvec", + "vello_common", +] + +[[package]] +name = "glow" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.13.2", + "cfg_aliases", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "guillotiere" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab" +dependencies = [ + "euclid", +] + [[package]] name = "half" version = "2.7.1" @@ -153,6 +783,33 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "harfrust" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "read-fonts", + "smallvec", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + [[package]] name = "image" version = "0.24.9" @@ -166,11 +823,111 @@ dependencies = [ "gif", "jpeg-decoder", "num-traits", - "png", + "png 0.17.16", "qoi", "tiff", ] +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png 0.18.1", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom", + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.3.2" @@ -180,19 +937,123 @@ dependencies = [ "rayon", ] +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + [[package]] name = "lebe" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.5", +] + +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + [[package]] name = "media-viewer" version = "0.1.0" dependencies = [ - "image", + "eframe", + "image 0.24.9", + "rfd", ] +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -213,6 +1074,16 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "multiversion" version = "0.8.1" @@ -231,10 +1102,46 @@ checksum = "a05e0c3c3e4edaa21d87c645852ed0b0c3663752bcc6ec43353bd6189dce35e1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", "target-features", ] +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "num-traits" version = "0.2.19" @@ -244,19 +1151,459 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-uniform-type-identifiers 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers 0.2.2", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4" +dependencies = [ + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "peniko" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6" +dependencies = [ + "bytemuck", + "color", + "kurbo", + "linebender_resource_handle", + "smallvec", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6c2123f4708bbd422630a6dae7c03f678b1ce1f1c99e4c4b3beac69c8174cc9" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358938fd6df944c1e44bb328b60fb275f13c804aac47ba26a1165d45a3f87756" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "png" version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", "miniz_oxide 0.8.9", ] +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9b9cf600136f5b976fbc5727d58c26e1ecab8ee23088d44ef1c7af793550ab" + +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro2" version = "1.0.107" @@ -266,6 +1613,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + [[package]] name = "qoi" version = "0.4.1" @@ -275,6 +1634,15 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.47" @@ -284,6 +1652,18 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + [[package]] name = "rayon" version = "1.12.0" @@ -304,18 +1684,255 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "read-fonts" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "rfd" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4b9d4857b10297ffb0f64cae711e983a7aeaee561848d56d429d3858bd8ed93" +dependencies = [ + "block2 0.6.2", + "dispatch2", + "js-sys", + "libc", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-uniform-type-identifiers 0.3.2", + "percent-encoding", + "pollster", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "self_cell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "simd-adler32" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "skrifa" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" +dependencies = [ + "bytemuck", + "read-fonts", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "syn" version = "2.0.119" @@ -327,12 +1944,63 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "target-features" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + [[package]] name = "tiff" version = "0.9.1" @@ -344,18 +2012,455 @@ dependencies = [ "weezl", ] +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml_datetime" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.19+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd43688c4858d7264ae1cf9a9f874a67c3feb74a883b1cd7bebd6a4ea8307218" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" + +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" +[[package]] +name = "unicode-properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993ad287eb20e8ba755312801cfe1413e0f25d604075863acaddca10b04c1833" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "uuid" +version = "1.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" + +[[package]] +name = "vello_common" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb2141a2bca6e6d598e471fd4d1d7eed8e020aad6a28187edda07f091a325dd" +dependencies = [ + "bytemuck", + "fearless_simd", + "guillotiere", + "log", + "peniko", + "smallvec", + "thiserror 2.0.21", +] + +[[package]] +name = "vello_cpu" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace506ca414548966fcf3c283be94eb1cad8254de488791ee698bf438b0890a9" +dependencies = [ + "bytemuck", + "glifo", + "hashbrown", + "vello_common", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.10", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.6", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.6", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "weezl" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", + "orbclient", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + [[package]] name = "zerocopy" version = "0.8.63" @@ -373,7 +2478,7 @@ checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4931319..c6d3711 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] +eframe = { version = "0.37", default-features = false, features = ["default_fonts", "glow"] } image = "0.24" +rfd = "0.18" diff --git a/README.md b/README.md index 81eb98b..f50e26a 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,28 @@ -# Media Viewer Application +# Media Viewer -A high-performance media viewer for Windows 11 using Rust. +A desktop image viewer for Windows, written in Rust. It opens a native window using eframe/egui; no browser or WebView is involved. -## Features +## Run -- Native Windows UI integration (no WebView components) -- Support for common image formats: JPG, PNG, BMP, GIF, TIFF, WebP -- Keyboard navigation controls (arrow keys, zoom controls) -- Fullscreen mode capability -- File browsing functionality -- Modern Windows 11 styling patterns - -## Implementation Status - -This is a prototype implementation with the following characteristics: - -### Core Functionality Implemented -- Media viewer configuration and state management -- Image metadata handling -- Navigation controls (previous/next images) -- Zoom functionality (in/out/reset) -- Fullscreen toggle capability - -### Limitations of Current Implementation -1. **No actual image loading**: The code structure is present but does not actually load or display images -2. **No Windows API integration**: The application is a console-based prototype that demonstrates the architecture but lacks native UI elements -3. **No real file browsing**: File system integration is not implemented - -### Architecture Components - -The application follows a modular architecture: - -1. **Core Viewer Logic** - - State Management - - Configuration - - Metadata Handling - -2. **Image Processing** - - Format Support - - Loading & Rendering (prototype only) - - Optimization - -3. **UI Framework** - - Windows Integration - - Native Controls - - Styling - -4. **Navigation System** - - File Browsing - - Image Sequences - - Playback Controls - -5. **Performance Features** - - Caching - - Memory Management - - Rendering Optimization - -## Build Instructions - -```bash -cargo build +```powershell cargo run +cargo run -- "C:\path\to\photo.jpg" +cargo run -- "C:\path\to\folder" ``` -## Usage +To create an executable, run `cargo build --release`. The result is `target\release\media-viewer.exe`. -The application demonstrates the intended functionality through console output. To see a working media viewer, additional implementation would be required for: +## Use -1. Actual image loading capabilities with format support -2. Windows UI components using winapi or other native UI crates -3. File browsing and selection functionality -4. Real rendering of images in the application window -5. Extension to support video and audio formats +- **Open image** or **Ctrl+O** selects an image. The viewer also finds other supported images in the same folder for navigation. +- **Open folder** loads the images in a folder, sorted by filename. +- Drag and drop an image or folder into the window. +- **Left/Right** or the toolbar buttons move between images. Navigation wraps at either end. +- **+ / -** or the toolbar buttons change zoom; **Ctrl+mouse wheel** also zooms. **0** or **Fit** fits the image in the window. +- **F11** toggles fullscreen; **Esc** exits it. +- **Play slides** advances through the folder every three seconds; **Pause slides** stops it. +- Animated GIFs play at their embedded frame timing. Use **Pause GIF** or **Play GIF** to control them independently of the folder slideshow. -## Future Enhancements +Supported image types: JPEG, PNG, BMP, animated GIF, TIFF, and WebP. Images are prefiltered when reduced to fit the window, which avoids harsh edges and aliasing. The status bar shows the filename, position, dimensions, and file size. Decoding errors appear in the window. -- Implement actual image loading capabilities with format support -- Add proper Windows UI components using winapi or similar crates -- Implement file system browsing for media files -- Add real-time rendering of images in the UI -- Extend to support video and audio formats -- Implement advanced features like batch processing and metadata editing - -## Development Notes - -This prototype provides a foundation for building a full-featured media viewer. The current code demonstrates the structure and intended architecture but lacks actual implementation of core features. +The `test_images` folder contains working examples of every supported format, including a two-frame animated GIF. Regenerate them with `cargo run --example generate_samples`. diff --git a/examples/generate_samples.rs b/examples/generate_samples.rs new file mode 100644 index 0000000..b7adaee --- /dev/null +++ b/examples/generate_samples.rs @@ -0,0 +1,46 @@ +//! Regenerate the small, valid sample images in `test_images`. +use image::{codecs::gif::GifEncoder, Delay, DynamicImage, Frame, Rgba, RgbaImage}; +use std::{ + fs::{self, File}, + path::Path, +}; + +fn main() -> Result<(), Box> { + let directory = Path::new("test_images"); + fs::create_dir_all(directory)?; + let image = RgbaImage::from_fn(480, 320, |x, y| { + let stripe = ((x / 32) + (y / 32)) % 2 == 0; + if stripe { + Rgba([57, 107, 155, 255]) + } else { + Rgba([244, 172, 85, 255]) + } + }); + let rgba = DynamicImage::ImageRgba8(image.clone()); + rgba.to_rgb8().save(directory.join("test_image_1.jpg"))?; + rgba.save(directory.join("test_image_2.png"))?; + rgba.save(directory.join("test_image_3.bmp"))?; + rgba.save(directory.join("test_image_5.tiff"))?; + rgba.save(directory.join("test_image_6.webp"))?; + + let path = directory.join("test_image_4.gif"); + let mut encoder = GifEncoder::new(File::create(path)?); + for (background, foreground) in [ + ([57, 107, 155], [244, 172, 85]), + ([244, 172, 85], [57, 107, 155]), + ] { + let frame = RgbaImage::from_fn(480, 320, |x, y| { + let inside = (x as i32 - 240).pow(2) + (y as i32 - 160).pow(2) < 100 * 100; + let color = if inside { foreground } else { background }; + Rgba([color[0], color[1], color[2], 255]) + }); + encoder.encode_frame(Frame::from_parts( + frame, + 0, + 0, + Delay::from_numer_denom_ms(400, 1), + ))?; + } + println!("Generated samples in {}", directory.display()); + Ok(()) +} diff --git a/src/main.rs b/src/main.rs index 476b6ba..eca39f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,439 +1,647 @@ -// A high-performance media viewer for Windows 11 using Rust -// Advanced implementation with enhanced functionality +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] -use std::path::{Path, PathBuf}; -use std::collections::HashMap; -use std::fs; -use std::time::SystemTime; +use eframe::egui::{self, Color32, ColorImage, Key, RichText, TextureHandle, TextureOptions, Vec2}; +use image::{codecs::gif::GifDecoder, imageops::FilterType, AnimationDecoder, RgbaImage}; +use std::{ + fs::{self, File}, + io::BufReader, + path::{Path, PathBuf}, + time::{Duration, Instant}, +}; -// Media viewer configuration -#[derive(Debug, Clone)] -struct ViewerConfig { - window_width: u32, - window_height: u32, - zoom_level: f64, +const EXTENSIONS: &[&str] = &["jpg", "jpeg", "png", "bmp", "gif", "tif", "tiff", "webp"]; +const BACKGROUND: Color32 = Color32::from_rgb(17, 20, 26); +const SURFACE: Color32 = Color32::from_rgb(25, 29, 37); +const CANVAS: Color32 = Color32::from_rgb(34, 38, 47); +const MUTED: Color32 = Color32::from_rgb(153, 163, 179); +const ACCENT: Color32 = Color32::from_rgb(122, 191, 255); + +fn is_image(path: &Path) -> bool { + path.extension() + .and_then(|ext| ext.to_str()) + .is_some_and(|ext| { + EXTENSIONS + .iter() + .any(|known| ext.eq_ignore_ascii_case(known)) + }) +} + +fn images_in(directory: &Path) -> Result, String> { + let entries = + fs::read_dir(directory).map_err(|e| format!("Cannot open {}: {e}", directory.display()))?; + let mut images: Vec<_> = entries + .flatten() + .map(|entry| entry.path()) + .filter(|path| path.is_file() && is_image(path)) + .collect(); + images.sort_by(|a, b| { + a.file_name() + .unwrap_or_default() + .to_string_lossy() + .to_lowercase() + .cmp( + &b.file_name() + .unwrap_or_default() + .to_string_lossy() + .to_lowercase(), + ) + .then_with(|| a.cmp(b)) + }); + Ok(images) +} + +fn format_size(bytes: u64) -> String { + if bytes < 1_048_576 { + format!("{:.0} KB", bytes as f64 / 1024.0) + } else { + format!("{:.1} MB", bytes as f64 / 1_048_576.0) + } +} + +fn scaled_pixels(source: &RgbaImage, width: u32, height: u32) -> RgbaImage { + if width >= source.width() && height >= source.height() { + source.clone() + } else { + image::imageops::resize(source, width.max(1), height.max(1), FilterType::Triangle) + } +} + +struct AnimatedFrame { + pixels: RgbaImage, + delay: Duration, +} + +fn gif_frames(path: &Path) -> Result, String> { + let file = File::open(path).map_err(|e| e.to_string())?; + let decoder = GifDecoder::new(BufReader::new(file)).map_err(|e| e.to_string())?; + let frames = decoder + .into_frames() + .collect_frames() + .map_err(|e| e.to_string())?; + Ok(frames + .into_iter() + .map(|frame| { + let (numerator, denominator) = frame.delay().numer_denom_ms(); + let millis = (numerator as u64 / denominator.max(1) as u64).max(20); + AnimatedFrame { + pixels: frame.into_buffer(), + delay: Duration::from_millis(millis), + } + }) + .collect()) +} + +struct Viewer { + files: Vec, + current: usize, + texture: Option, + source: Option, + texture_size: Option<(u32, u32)>, + animation: Vec, + frame_index: usize, + last_frame_at: Instant, + gif_paused: bool, + dimensions: Option<(u32, u32)>, + file_size: Option, + zoom: f32, + fit: bool, fullscreen: bool, - show_toolbar: bool, - enable_cache: bool, + playing: bool, + last_advance: Instant, + error: Option, } -impl Default for ViewerConfig { - fn default() -> Self { - ViewerConfig { - window_width: 1024, - window_height: 768, - zoom_level: 1.0, +impl Viewer { + fn new(path: Option, ctx: &egui::Context) -> Self { + let mut viewer = Self { + files: vec![], + current: 0, + texture: None, + source: None, + texture_size: None, + animation: Vec::new(), + frame_index: 0, + last_frame_at: Instant::now(), + gif_paused: false, + dimensions: None, + file_size: None, + zoom: 1.0, + fit: true, fullscreen: false, - show_toolbar: true, - enable_cache: true, - } - } -} - -// Image metadata structure -#[derive(Debug, Clone)] -struct ImageMetadata { - file_path: String, - file_size: u64, - dimensions: (u32, u32), - format: String, - last_modified: SystemTime, - exif_data: Option>, -} - -// File browsing result structure -#[derive(Debug, Clone)] -struct FileBrowserResult { - files: Vec, - directories: Vec, - total_files: usize, - total_directories: usize, -} - -// Media viewer state management -#[derive(Debug)] -struct MediaViewerState { - current_image: Option, - image_list: Vec, - current_index: usize, - config: ViewerConfig, - zoom_level: f64, - is_fullscreen: bool, - is_playing: bool, - current_directory: PathBuf, -} - -impl MediaViewerState { - fn new() -> Self { - MediaViewerState { - current_image: None, - image_list: Vec::new(), - current_index: 0, - config: ViewerConfig::default(), - zoom_level: 1.0, - is_fullscreen: false, - is_playing: false, - current_directory: PathBuf::from("."), + playing: false, + last_advance: Instant::now(), + error: None, + }; + if let Some(path) = path { + viewer.open_path(path, ctx); } + viewer } - fn load_image(&mut self, path: &str) -> Result { - let file_path = Path::new(path); - if !file_path.exists() { - return Err(format!("File does not exist: {}", path)); - } - - // Get file metadata - let metadata = file_path.metadata() - .map_err(|e| format!("Failed to get file metadata: {}", e))?; - - // Determine image format - let extension = file_path.extension() - .and_then(|ext| ext.to_str()) - .map(|s| s.to_lowercase()); - - let format = match extension.as_ref().map(|s| s.as_str()) { - Some("jpg") | Some("jpeg") => "JPEG".to_string(), - Some("png") => "PNG".to_string(), - Some("bmp") => "BMP".to_string(), - Some("gif") => "GIF".to_string(), - Some("tiff") | Some("tif") => "TIFF".to_string(), - Some("webp") => "WebP".to_string(), - _ => "Unknown".to_string(), + fn open_path(&mut self, path: PathBuf, ctx: &egui::Context) { + let path = match path.canonicalize() { + Ok(path) => path, + Err(error) => { + self.error = Some(format!("Cannot open {}: {error}", path.display())); + return; + } }; - - // Try to load image with image crate to get dimensions - let dimensions = match image::open(file_path) { - Ok(img) => (img.width(), img.height()), - Err(_) => (0, 0), // If we can't load the image, set dimensions to 0 + let selected = if path.is_file() { + Some(path.clone()) + } else { + None }; - - // Create metadata - let image_metadata = ImageMetadata { - file_path: path.to_string(), - file_size: metadata.len(), - dimensions, - format, - last_modified: metadata.modified() - .unwrap_or(SystemTime::UNIX_EPOCH), - exif_data: None, // Would be populated with real EXIF data + let directory = if path.is_dir() { + path.clone() + } else if let Some(parent) = path.parent() { + parent.to_path_buf() + } else { + self.error = Some(format!("Cannot open {}", path.display())); + return; }; - - self.current_image = Some(image_metadata.clone()); - Ok(image_metadata) - } - - fn load_images(&mut self, paths: Vec) { - let mut images = Vec::new(); - for path in paths { - if let Ok(metadata) = self.load_image(&path) { - images.push(metadata); + if let Some(file) = &selected { + if !is_image(file) { + self.error = Some(format!("Unsupported image: {}", file.display())); + return; } } - self.image_list = images; - self.current_index = 0; + match images_in(&directory) { + Ok(files) => { + self.current = selected + .as_ref() + .and_then(|file| files.iter().position(|entry| entry == file)) + .unwrap_or(0); + self.files = files; + self.playing = false; + self.fit = true; + self.zoom = 1.0; + self.load_current(ctx); + if self.files.is_empty() { + self.error = Some(format!("No supported images in {}", directory.display())); + } + } + Err(error) => self.error = Some(error), + } } - fn next_image(&mut self) -> Option<&ImageMetadata> { - if !self.image_list.is_empty() && self.current_index < self.image_list.len() - 1 { - self.current_index += 1; - self.current_image = Some(self.image_list[self.current_index].clone()); - Some(&self.image_list[self.current_index]) + fn load_current(&mut self, ctx: &egui::Context) { + self.texture = None; + self.source = None; + self.texture_size = None; + self.animation.clear(); + self.frame_index = 0; + self.gif_paused = false; + self.dimensions = None; + self.file_size = None; + self.error = None; + let Some(path) = self.files.get(self.current) else { + return; + }; + if path + .extension() + .and_then(|ext| ext.to_str()) + .is_some_and(|ext| ext.eq_ignore_ascii_case("gif")) + { + match gif_frames(path) { + Ok(frames) if !frames.is_empty() => { + self.dimensions = Some(frames[0].pixels.dimensions()); + self.file_size = fs::metadata(path).ok().map(|meta| meta.len()); + self.source = Some(frames[0].pixels.clone()); + self.animation = frames; + self.last_frame_at = Instant::now(); + ctx.request_repaint(); + } + Ok(_) => self.error = Some(format!("GIF contains no frames: {}", path.display())), + Err(error) => { + self.error = Some(format!("Cannot decode {}: {error}", path.display())) + } + } + return; + } + match image::open(path) { + Ok(image) => { + let rgba = image.to_rgba8(); + self.dimensions = Some((rgba.width(), rgba.height())); + self.file_size = fs::metadata(path).ok().map(|meta| meta.len()); + self.source = Some(rgba); + ctx.request_repaint(); + self.last_advance = Instant::now(); + } + Err(error) => self.error = Some(format!("Cannot decode {}: {error}", path.display())), + } + } + + fn prepare_texture(&mut self, ctx: &egui::Context, display: Vec2) { + let Some(source) = &self.source else { return }; + let width = (display.x.round() as u32).clamp(1, source.width()); + let height = (display.y.round() as u32).clamp(1, source.height()); + if self.texture_size == Some((width, height)) { + return; + } + let pixels = scaled_pixels(source, width, height); + let color = ColorImage::from_rgba_unmultiplied( + [pixels.width() as usize, pixels.height() as usize], + pixels.as_raw(), + ); + self.texture = Some(ctx.load_texture("current image", color, TextureOptions::LINEAR)); + self.texture_size = Some((width, height)); + } + + fn advance_gif(&mut self, ctx: &egui::Context) { + if self.animation.len() < 2 || self.gif_paused { + return; + } + let delay = self.animation[self.frame_index].delay; + if self.last_frame_at.elapsed() >= delay { + self.frame_index = (self.frame_index + 1) % self.animation.len(); + self.source = Some(self.animation[self.frame_index].pixels.clone()); + self.texture_size = None; + self.last_frame_at = Instant::now(); + ctx.request_repaint(); } else { - None + ctx.request_repaint_after(delay - self.last_frame_at.elapsed()); } } - fn prev_image(&mut self) -> Option<&ImageMetadata> { - if !self.image_list.is_empty() && self.current_index > 0 { - self.current_index -= 1; - self.current_image = Some(self.image_list[self.current_index].clone()); - Some(&self.image_list[self.current_index]) - } else { - None + fn move_by(&mut self, step: isize, ctx: &egui::Context) { + if self.files.is_empty() { + return; + } + self.current = + (self.current as isize + step).rem_euclid(self.files.len() as isize) as usize; + self.load_current(ctx); + } + fn set_zoom(&mut self, zoom: f32) { + self.zoom = zoom.clamp(0.1, 8.0); + self.fit = false; + } + fn toggle_fullscreen(&mut self, ctx: &egui::Context) { + self.fullscreen = !self.fullscreen; + ctx.send_viewport_cmd(egui::ViewportCommand::Fullscreen(self.fullscreen)); + } + fn pick_file(&mut self, ctx: &egui::Context) { + if let Some(path) = rfd::FileDialog::new() + .add_filter("Images", EXTENSIONS) + .pick_file() + { + self.open_path(path, ctx); } } - - fn zoom_in(&mut self) { - self.zoom_level = (self.zoom_level + 0.1).min(3.0); - self.config.zoom_level = self.zoom_level; - } - - fn zoom_out(&mut self) { - self.zoom_level = (self.zoom_level - 0.1).max(0.5); - self.config.zoom_level = self.zoom_level; - } - - fn reset_zoom(&mut self) { - self.zoom_level = 1.0; - self.config.zoom_level = self.zoom_level; - } - - fn toggle_fullscreen(&mut self) { - self.is_fullscreen = !self.is_fullscreen; - self.config.fullscreen = self.is_fullscreen; - } - - // File browsing functionality - fn browse_directory(&self, path: &Path) -> Result { - let mut files = Vec::new(); - let mut directories = Vec::new(); - let mut total_files = 0; - let mut total_directories = 0; - - // Check if directory exists - if !path.exists() { - return Err(format!("Directory does not exist: {:?}", path)); + fn keyboard(&mut self, ctx: &egui::Context) { + let (prev, next, plus, minus, fit, fullscreen, escape, open) = ctx.input(|i| { + ( + i.key_pressed(Key::ArrowLeft), + i.key_pressed(Key::ArrowRight), + i.key_pressed(Key::Plus) || i.key_pressed(Key::Equals), + i.key_pressed(Key::Minus), + i.key_pressed(Key::Num0), + i.key_pressed(Key::F11), + i.key_pressed(Key::Escape), + i.modifiers.command && i.key_pressed(Key::O), + ) + }); + if prev { + self.move_by(-1, ctx); } - - if !path.is_dir() { - return Err(format!("Path is not a directory: {:?}", path)); + if next { + self.move_by(1, ctx); } - - // Read all entries in the directory - let mut entries = fs::read_dir(path) - .map_err(|e| format!("Failed to read directory {:?}: {}", path, e))? - .collect::, _>>() - .map_err(|e| format!("Failed to collect directory entries: {}", e))?; - - // Sort entries - entries.sort_by_key(|entry| entry.file_name()); - - for entry in entries { - let file_path = entry.path(); - - if file_path.is_dir() { - directories.push(file_path); - total_directories += 1; - } else if file_path.is_file() { - // Check if it's a supported image file - if let Some(extension) = file_path.extension() { - if let Some(ext_str) = extension.to_str() { - let ext_lower = ext_str.to_lowercase(); - if self.is_supported_image_format(&ext_lower) { - // Get metadata for the file - if let Ok(metadata) = file_path.metadata() { - let file_size = metadata.len(); - let last_modified = metadata.modified().unwrap_or(SystemTime::UNIX_EPOCH); - - // Determine format from extension - let format = match ext_lower.as_str() { - "jpg" | "jpeg" => "JPEG".to_string(), - "png" => "PNG".to_string(), - "bmp" => "BMP".to_string(), - "gif" => "GIF".to_string(), - "tiff" | "tif" => "TIFF".to_string(), - "webp" => "WebP".to_string(), - _ => "Unknown".to_string(), - }; - - // Try to get image dimensions - let dimensions = match image::open(&file_path) { - Ok(img) => (img.width(), img.height()), - Err(_) => (0, 0), - }; - - let image_metadata = ImageMetadata { - file_path: file_path.to_string_lossy().to_string(), - file_size, - dimensions, - format, - last_modified, - exif_data: None, - }; - - files.push(image_metadata); - total_files += 1; - } + if plus { + self.set_zoom(self.zoom * 1.25); + } + if minus { + self.set_zoom(self.zoom / 1.25); + } + if fit { + self.fit = true; + self.zoom = 1.0; + } + if fullscreen || (escape && self.fullscreen) { + self.toggle_fullscreen(ctx); + } + if open { + self.pick_file(ctx); + } + } +} + +impl eframe::App for Viewer { + fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + let ctx = &ui.ctx().clone(); + self.keyboard(ctx); + if let Some(path) = + ctx.input(|i| i.raw.dropped_files.first().map(|f| f.path().to_path_buf())) + { + self.open_path(path, ctx); + } + self.advance_gif(ctx); + if self.playing && self.files.len() > 1 { + if self.last_advance.elapsed() >= Duration::from_secs(3) { + self.move_by(1, ctx); + } + ctx.request_repaint_after(Duration::from_millis(100)); + } + egui::Panel::top("toolbar") + .frame( + egui::Frame::default() + .fill(SURFACE) + .inner_margin(egui::Margin::symmetric(20, 12)), + ) + .show(ui, |ui| { + ui.horizontal(|ui| { + ui.label( + RichText::new("MEDIA VIEWER") + .size(18.0) + .strong() + .color(Color32::WHITE), + ); + ui.add_space(14.0); + if let Some(path) = self.files.get(self.current) { + ui.label( + RichText::new(path.file_name().unwrap_or_default().to_string_lossy()) + .size(14.0) + .color(MUTED), + ); + } else { + ui.label( + RichText::new("A quiet place for your images") + .size(14.0) + .color(MUTED), + ); + } + }); + ui.add_space(10.0); + ui.horizontal_wrapped(|ui| { + if ui.button("Open image").clicked() { + self.pick_file(ctx); + } + if ui.button("Open folder").clicked() { + if let Some(path) = rfd::FileDialog::new().pick_folder() { + self.open_path(path, ctx); } } + ui.add_space(12.0); + ui.separator(); + if ui + .add_enabled(!self.files.is_empty(), egui::Button::new("Previous")) + .clicked() + { + self.move_by(-1, ctx); + } + if ui + .add_enabled(!self.files.is_empty(), egui::Button::new("Next")) + .clicked() + { + self.move_by(1, ctx); + } + if ui + .add_enabled( + self.files.len() > 1, + egui::Button::new(if self.playing { + "Pause slides" + } else { + "Play slides" + }), + ) + .clicked() + { + self.playing = !self.playing; + self.last_advance = Instant::now(); + } + if self.animation.len() > 1 + && ui + .button(if self.gif_paused { + "Play GIF" + } else { + "Pause GIF" + }) + .clicked() + { + self.gif_paused = !self.gif_paused; + self.last_frame_at = Instant::now(); + } + ui.add_space(12.0); + ui.separator(); + if ui + .add_enabled(self.source.is_some(), egui::Button::new("−")) + .clicked() + { + self.set_zoom(self.zoom / 1.25); + } + if ui + .add_enabled(self.source.is_some(), egui::Button::new("+")) + .clicked() + { + self.set_zoom(self.zoom * 1.25); + } + if ui + .add_enabled(self.source.is_some(), egui::Button::new("Fit")) + .clicked() + { + self.fit = true; + self.zoom = 1.0; + } + if ui + .button(if self.fullscreen { + "Exit fullscreen" + } else { + "Fullscreen" + }) + .clicked() + { + self.toggle_fullscreen(ctx); + } + }); + }); + egui::Panel::bottom("status") + .frame(egui::Frame::default().fill(SURFACE).inner_margin(egui::Margin::symmetric(20, 9))) + .show(ui, |ui| ui.horizontal(|ui| { + if let Some(path) = self.files.get(self.current) { + ui.label(RichText::new(format!("{} / {}", self.current + 1, self.files.len())).color(ACCENT)); + ui.label(RichText::new(path.file_name().unwrap_or_default().to_string_lossy()).color(MUTED)); + if let Some((w, h)) = self.dimensions { ui.label(RichText::new(format!("· {w} × {h}")).color(MUTED)); } + if let Some(bytes) = self.file_size { ui.label(RichText::new(format!("· {}", format_size(bytes))).color(MUTED)); } + ui.label(RichText::new(if self.fit { "· Fit".to_owned() } else { format!("· {:.0}%", self.zoom * 100.0) }).color(MUTED)); + if self.animation.len() > 1 { ui.label(RichText::new(format!("· GIF {} / {}", self.frame_index + 1, self.animation.len())).color(ACCENT)); } + } else { ui.label(RichText::new("Ctrl+O open Arrow keys navigate +/- zoom 0 fit F11 fullscreen").color(MUTED)); } + })); + egui::CentralPanel::default() + .frame( + egui::Frame::default() + .fill(CANVAS) + .inner_margin(egui::Margin::same(16)), + ) + .show(ui, |ui| { + if let Some(error) = &self.error { + ui.colored_label(Color32::from_rgb(255, 130, 130), error); } - } - } - - // Sort files by name - files.sort_by_key(|file| file.file_path.clone()); - - Ok(FileBrowserResult { - files, - directories, - total_files, - total_directories, - }) - } - - fn is_supported_image_format(&self, extension: &str) -> bool { - matches!(extension, - "jpg" | "jpeg" | "png" | "bmp" | "gif" | "tiff" | "tif" | "webp" - ) + if let Some((w, h)) = self.dimensions { + let available = ui.available_size(); + let source = Vec2::new(w as f32, h as f32); + let scale = if self.fit { + (available.x / source.x) + .min(available.y / source.y) + .min(1.0) + } else { + self.zoom + }; + let display = source * scale; + self.prepare_texture(ctx, display); + let Some(texture) = &self.texture else { + return; + }; + egui::ScrollArea::both() + .auto_shrink([false, false]) + .show(ui, |ui| { + ui.allocate_ui_with_layout( + available.max(display), + egui::Layout::top_down(egui::Align::Center), + |ui| { + ui.add_space(((available.y - display.y) / 2.0).max(0.0)); + ui.add(egui::Image::new(texture).fit_to_exact_size(display)); + }, + ); + }); + let wheel = ctx.input(|i| i.smooth_scroll_delta.y); + if wheel != 0.0 && ctx.input(|i| i.modifiers.ctrl) { + self.set_zoom(self.zoom * if wheel > 0.0 { 1.1 } else { 1.0 / 1.1 }); + } + } else if self.error.is_none() { + let height = ui.available_height(); + ui.vertical_centered(|ui| { + ui.add_space(height * 0.35); + ui.label( + RichText::new("Your images, in focus") + .size(25.0) + .strong() + .color(Color32::WHITE), + ); + ui.add_space(8.0); + ui.label( + RichText::new("Drop an image here, or open a file or folder to begin.") + .size(14.0) + .color(MUTED), + ); + }); + } + }); } } -// Main application structure -struct MediaViewer { - state: MediaViewerState, - supported_formats: Vec<&'static str>, - features: Vec<&'static str>, +fn main() -> eframe::Result { + let path = std::env::args_os().nth(1).map(PathBuf::from); + let options = eframe::NativeOptions { + viewport: egui::ViewportBuilder::default() + .with_title("Media Viewer") + .with_inner_size([1100.0, 760.0]), + ..Default::default() + }; + eframe::run_native( + "Media Viewer", + options, + Box::new(move |creation| { + let mut visuals = egui::Visuals::dark(); + visuals.panel_fill = BACKGROUND; + visuals.widgets.inactive.weak_bg_fill = Color32::from_rgb(45, 52, 64); + visuals.widgets.inactive.corner_radius = egui::CornerRadius::same(7); + visuals.widgets.hovered.weak_bg_fill = Color32::from_rgb(61, 72, 89); + visuals.widgets.hovered.corner_radius = egui::CornerRadius::same(7); + visuals.widgets.active.weak_bg_fill = Color32::from_rgb(56, 103, 147); + visuals.widgets.active.corner_radius = egui::CornerRadius::same(7); + visuals.selection.bg_fill = Color32::from_rgb(52, 109, 161); + creation.egui_ctx.set_visuals(visuals); + creation.egui_ctx.style_mut_of(egui::Theme::Dark, |style| { + style.spacing.button_padding = egui::vec2(12.0, 7.0); + style.spacing.item_spacing = egui::vec2(9.0, 8.0); + }); + Ok(Box::new(Viewer::new(path, &creation.egui_ctx))) + }), + ) } -impl MediaViewer { - fn new() -> Self { - MediaViewer { - state: MediaViewerState::new(), - supported_formats: vec!["jpg", "jpeg", "png", "bmp", "gif", "tiff", "webp"], - features: vec![ - "Native Windows UI", - "High-performance Rust implementation", - "Multi-format image support", - "Keyboard navigation controls", - "Zoom functionality", - "Fullscreen mode", - "File browsing", - "Metadata display", - "Performance optimization", - "Windows 11 styling" - ], - } +#[cfg(test)] +mod tests { + use super::*; + use image::{codecs::gif::GifEncoder, Delay, Frame, Rgba}; + #[test] + fn recognizes_extensions() { + assert!(is_image(Path::new("photo.JPEG"))); + assert!(is_image(Path::new("image.webp"))); + assert!(!is_image(Path::new("notes.txt"))); + } + #[test] + fn lists_images_in_order() { + let dir = std::env::temp_dir().join(format!("media-viewer-test-{}", std::process::id())); + fs::create_dir_all(&dir).unwrap(); + fs::write(dir.join("b.png"), []).unwrap(); + fs::write(dir.join("A.jpg"), []).unwrap(); + fs::write(dir.join("other.txt"), []).unwrap(); + let names: Vec<_> = images_in(&dir) + .unwrap() + .into_iter() + .map(|p| p.file_name().unwrap().to_owned()) + .collect(); + assert_eq!(names, ["A.jpg", "b.png"]); + fs::remove_dir_all(dir).unwrap(); } - fn initialize(&mut self) { - println!("Initializing Media Viewer..."); - println!("Supported formats: {:?}", self.supported_formats); - println!("Features:"); - for (i, feature) in self.features.iter().enumerate() { - println!(" {}. {}", i + 1, feature); + #[test] + fn decodes_animated_gif_frames_and_delays() { + let path = + std::env::temp_dir().join(format!("media-viewer-animation-{}.gif", std::process::id())); + { + let mut encoder = GifEncoder::new(File::create(&path).unwrap()); + let red = RgbaImage::from_pixel(2, 2, Rgba([255, 0, 0, 255])); + let blue = RgbaImage::from_pixel(2, 2, Rgba([0, 0, 255, 255])); + encoder + .encode_frame(Frame::from_parts( + red, + 0, + 0, + Delay::from_numer_denom_ms(80, 1), + )) + .unwrap(); + encoder + .encode_frame(Frame::from_parts( + blue, + 0, + 0, + Delay::from_numer_denom_ms(120, 1), + )) + .unwrap(); } + let frames = gif_frames(&path).unwrap(); + assert_eq!(frames.len(), 2); + assert_eq!(frames[0].delay, Duration::from_millis(80)); + assert_eq!(frames[1].delay, Duration::from_millis(120)); + assert_ne!(frames[0].pixels, frames[1].pixels); + fs::remove_file(path).unwrap(); } - fn run_demo(&self) { - println!("\n=== Media Viewer Demo ==="); - println!("This is a high-performance media viewer built with Rust for Windows 11."); - println!(); - - // Demonstrate core capabilities - let demo_files = vec![ - "example.jpg", - "sample.png", - "test.gif" - ]; - - println!("Demonstrating file handling:"); - for file in &demo_files { - if Path::new(file).exists() { - println!(" ✓ Found: {}", file); + #[test] + fn downscaling_blends_high_frequency_pixels() { + let source = RgbaImage::from_fn(8, 8, |x, y| { + if (x + y) % 2 == 0 { + Rgba([0, 0, 0, 255]) } else { - println!(" - Missing: {} (would be loaded in real implementation)", file); + Rgba([255, 255, 255, 255]) } - } - - println!("\nCore functionality available:"); - println!(" - Image loading and format validation"); - println!(" - Navigation (previous/next)"); - println!(" - Zoom controls (in/out/reset)"); - println!(" - Fullscreen mode"); - println!(" - Metadata display"); - println!(" - Performance optimizations"); + }); + let scaled = scaled_pixels(&source, 2, 2); + assert_eq!(scaled.dimensions(), (2, 2)); + let value = scaled.get_pixel(0, 0)[0]; + assert!((90..=165).contains(&value)); } - fn print_capabilities(&self) { - println!("\n=== CAPABILITIES ==="); - println!("Windows 11 Native UI:"); - println!(" ✓ Windows API integration ready"); - println!(" ✓ Modern styling patterns"); - println!(" ✓ Native performance"); - - println!("\nImage Processing:"); - println!(" ✓ JPEG, PNG, BMP, GIF, TIFF, WebP support"); - println!(" ✓ Metadata extraction"); - println!(" ✓ High-performance rendering"); - println!(" ✓ Memory-efficient handling"); - - println!("\nNavigation & Controls:"); - println!(" ✓ Keyboard navigation (arrow keys)"); - println!(" ✓ Zoom controls (mouse wheel/keys)"); - println!(" ✓ Fullscreen toggle"); - println!(" ✓ Slideshow mode"); - - println!("\nAdvanced Features:"); - println!(" ✓ Image caching"); - println!(" ✓ Thumbnail generation"); - println!(" ✓ Batch processing"); - println!(" ✓ Multi-monitor support"); - } - - fn browse_current_directory(&self) -> Result { - self.state.browse_directory(&self.state.current_directory) + #[test] + fn bundled_samples_are_decodable() { + let directory = Path::new(env!("CARGO_MANIFEST_DIR")).join("test_images"); + let paths = images_in(&directory).unwrap(); + assert_eq!(paths.len(), 6); + for path in paths { + let image = + image::open(&path).unwrap_or_else(|error| panic!("{}: {error}", path.display())); + assert!(image.width() > 0 && image.height() > 0); + } } } - -fn main() { - println!("Media Viewer Application - Advanced Version"); - println!("========================================="); - println!("A high-performance media viewer for Windows 11 using Rust."); - println!(); - - // Create and initialize the media viewer - let mut viewer = MediaViewer::new(); - viewer.initialize(); - - // Run demo to show capabilities - viewer.run_demo(); - - // Show detailed capabilities - viewer.print_capabilities(); - - println!("\n=== APPLICATION STRUCTURE ==="); - println!("├── Core Viewer Logic"); - println!("│ ├── State Management"); - println!("│ ├── Configuration"); - println!("│ └── Metadata Handling"); - println!("├── Image Processing"); - println!("│ ├── Format Support"); - println!("│ ├── Loading & Rendering"); - println!("│ └── Optimization"); - println!("├── UI Framework"); - println!("│ ├── Windows Integration"); - println!("│ ├── Native Controls"); - println!("│ └── Styling"); - println!("├── Navigation System"); - println!("│ ├── File Browsing"); - println!("│ ├── Image Sequences"); - println!("│ └── Playback Controls"); - println!("└── Performance Features"); - println!(" ├── Caching"); - println!(" ├── Memory Management"); - println!(" └── Rendering Optimization"); - - // Demonstrate file browsing capabilities - println!("\n=== FILE BROWSING DEMO ==="); - match viewer.browse_current_directory() { - Ok(result) => { - println!("Current directory contents:"); - println!(" Files: {}", result.total_files); - println!(" Directories: {}", result.total_directories); - - if !result.files.is_empty() { - println!("\nFirst few files:"); - for (i, file) in result.files.iter().take(5).enumerate() { - println!(" {}. {} ({} bytes, {}x{})", i + 1, file.file_path, file.file_size, file.dimensions.0, file.dimensions.1); - } - if result.files.len() > 5 { - println!(" ... and {} more files", result.files.len() - 5); - } - } else { - println!("\nNo image files found in current directory."); - } - }, - Err(e) => { - println!("Error browsing directory: {}", e); - } - } - - println!("\n=== USAGE INSTRUCTIONS ==="); - println!("To build and run:"); - println!(" cargo build"); - println!(" cargo run"); - println!(); - println!("This application is designed for Windows 11 with native UI elements."); - println!("The implementation provides a foundation for full media viewer functionality."); -} \ No newline at end of file diff --git a/test_images/test_image_1.jpg b/test_images/test_image_1.jpg index 5b2682738b9e908c979ea846a326fb69978c00a5..462dc6eb7ffe9ab3a965d6d5a26e538e7dac5a3c 100644 GIT binary patch literal 7246 zcmex=Xx<^ zMmBoJCPpAb7&$pPdANBbczGp^6lD~RNCy9pFvtVl$;t=@3{b$x#LU9V#?HaX#SK)j zRe*tsk(rr^g_)I=g$1a(7AViaBFHMFXz0i$9GJ+iR48K9IB_9|veU+cqCpows2C>| zHF0u@iAzXIsj8`KXlj|5nweWzS~We&gn?hmRgVdHU@6i$mSee*Oaai;;mD;w>Nv@fe!FfYHIo#KOYN z!VdBmBU3pLGYhh?DjKp0IR>&P778mFHFAhJOY>Zs9y6+CxL392yb< oIjEB&a!Ec~4vjV}2VW67S`LjiEC*i^IwaadqXjyZ3iSUs0f34D;{X5v literal 53 zcmWH^$ShU>qC|y)oW$hRjQpIG)FOqn{34);SAe@hW^Q77szO?3PAZpkeqKpxUWt{0 FApq|e5%mB7 diff --git a/test_images/test_image_2.png b/test_images/test_image_2.png index 156e8b7b27d788f7b87ffce6ec61d2dd0aabd099..46304a2e45d50b14cf1311c5740924e13ccbe72f 100644 GIT binary patch literal 4875 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|?4jgPik(3kbs~H%CE_u2*hEy=VJ;1y`C34!a zkN?Zx^`1DhyvRFwUGD8|P?Xs-Z<^Qoc}B)c?|znT&#GG1Zk>H~{k~J}wX=Wbf5~3| zdG(+2s^;K$)54PW%@ZWF$H>>@p>X)1USZn@d|K;_2&#nJ-|0QqT zYu=yliPk1Kb@jSkuU3JG{ZgZB`h*NWEyp8vAY`uo8LI|Ey6qC@^Rr4p%6uMX?pX zSnKT3xCJ*iXdj=*`R2ugly#uXw`;-#=dmmPDuY})#`t%N7qC|y)oW$hRjQpIG)FOqn{34)8fS#*megEUH z|Nid3{p){!{Pn5)`Tgf_K9xVE_i2~jr_De9O9t@o{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Ld{Vf@& z-+HP)m>-qChXy{Vy3P*?-~wEVG~X_5As_za<0uZ+}Y$O7^E+dY|^+TY>zX literal 53 zcmWH^$ShU>qC|y)oW$hRjQpIG)FOqn{34);lW%}RW^Q77szO?3PAZpkeqKpxUWt{0 FF#zt^5%mB7 diff --git a/test_images/test_image_4.gif b/test_images/test_image_4.gif index ea0b7eab9f9f40b6f77ee4524932d042bacd112f..7ecce313d6851ebf1e94178042b343a714c6638b 100644 GIT binary patch literal 2360 zcmeIydpr{e00(f~lE<>HyBwXkxpVKyRjzlW6K0AoC)rS!m~18&a;7szBrR0YiFoTIqJZ{cNoc1 zw`LUtG|6ZwokayY6m$~ij4_9aedP;xyP|9Ol^RpCERKk#MF&v^6^!L|*bd2j?fY!5 zT(eTI16kO6_@9bOL_Hue+lHizMwUA~15U$kWEPU2zZ#y>8gFv=>hPK9q`SYA*S7Oy zOD3Q1gnV-rj>sya)OC!=mrbp}UV-OgkZ2s0)yY?^05|XQK63tYGN!oVMc1hE{W@#M zy+I*YQnDXb)^`h3t7bM%KG4uuwt3DIHg{~=CT@C|eG6b}0QBfAX}SaWSas3JrPL>* zdfOS+5LW1b)>%PhZ%(y8^2dJRgYojDh1=c-A1}xC?Iv^-V8VI0fVrNoVvlQvLSs6S z>%BkAWOFo!bS&3@8l2otCtHz%JrCbG?nddSEYg#nwYhZ-R&8j`-;%|ko_2E8@tLc0Jf2!KZLe9zZdfnri*-*getA5N^S)cqx$v)<0HJApG6P3gx3+2O^g^mIDSlA+@!hk);4X#HmHetMYQ$4 zP2_5$_6Moe<7Gm9<5IlhGkT~bq_Hk;=F^r`J5b|F;ykDiAIWZbpR{NqViRK9G_&L+0pBfH_KVOLvu6auc`*_4f99Ge1F^>F&s|G>Zt*maA3?M*Ix!QM;`u zdY*?c-M-sbco$qQ6~fzE7e~;p?G{3elbSG*&0IiDVE3hn$8(A%qeS-(*upGx1AWD! zpV43Mm<;neae6rSRL~7!ehzG^EbKzM<j^y}mdh_@`EqtoX?ov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N+WfmeY6ePu z{j)zM110;@F1_0y`-}hf{*Zs0zxUVuQ8J+a`d>0ovj4*US!O@&>-qC?fAH@=`N!uUfBE|P51*gE_vQN^KluDx z-~8pqC|y)oW$hRjQpIG)FOqn{34)8h^L#ILS}Aada6QNW=<-XbADb)YF>$z Gf++w1QxZV{ diff --git a/test_images/test_image_6.webp b/test_images/test_image_6.webp index 1cfdb45038ff0bac1d11e99fee52408dc9e80e31..948a3e44b228385d82974114e136a0c3fa58939a 100644 GIT binary patch literal 480 zcmWIYbaT7G$iNWp>J$(bVBvEH$kxAq&|lzesDcuc9ETzw0|P??5Q6~|h%|t(K_m-| z`G6teePa$-dQLq|5K6N(FvCQ^3K$-ss%(JCGO#g#Y(oM9KmX-KZF;FSds@z}Q_ECm zuiKP)a@lG$p}YTYzWbl^y?)#J(ns`=NZt+(gVAyfjS?YI5y zzw_VbM^qeb4Ua(~K-wTi?|<0Ey?)0B6v6_e?caHz1;3@m(5wY=k&NDfZtWp$WOt!k Z8yqC|y)oW$hRjQpIG)FOqn{34)8xT{luLS}Aada6QNW=<-XbADb)YF>$z Gf*Ak+#1cmU