From a2695a2a11f24d5da54c0e214c13c1dae9e15e0c Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 8 Jul 2024 20:46:39 +0200 Subject: [PATCH] processing library: init --- Cargo.lock | 132 +++++++++++++++++++++++++++------ Cargo.toml | 1 + crates/prowocessing/Cargo.toml | 13 ++++ crates/prowocessing/src/lib.rs | 4 + 4 files changed, 126 insertions(+), 24 deletions(-) create mode 100644 crates/prowocessing/Cargo.toml create mode 100644 crates/prowocessing/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 4ff50ae..e97cb16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,6 +72,15 @@ dependencies = [ "time", ] +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + [[package]] name = "ariadne" version = "0.4.0" @@ -431,6 +440,12 @@ dependencies = [ "zune-inflate", ] +[[package]] +name = "fast-srgb8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" + [[package]] name = "fdeflate" version = "0.3.3" @@ -527,9 +542,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "image" -version = "0.24.7" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" dependencies = [ "bytemuck", "byteorder", @@ -537,7 +552,6 @@ dependencies = [ "exr", "gif", "jpeg-decoder", - "num-rational", "num-traits", "png", "qoi", @@ -718,27 +732,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.17" @@ -843,6 +836,71 @@ dependencies = [ "siphasher", ] +[[package]] +name = "palette" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d38e6e5ca1612e2081cc31188f08c3cba630ce4ba44709a153f1a0f38d678f2" +dependencies = [ + "approx", + "fast-srgb8", + "palette_derive", + "phf", +] + +[[package]] +name = "palette_derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05d1c929301fee6830dafa764341118829b2535c216b0571e3821ecac5c885b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "png" version = "0.17.10" @@ -871,6 +929,14 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prowocessing" +version = "0.1.0" +dependencies = [ + "image", + "palette", +] + [[package]] name = "qoi" version = "0.4.1" @@ -902,6 +968,24 @@ dependencies = [ [[package]] name = "rand" version = "0.8.5" +<<<<<<< HEAD +======= +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "rayon" +version = "1.8.0" +>>>>>>> 1d85252 (processing library: init) source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ diff --git a/Cargo.toml b/Cargo.toml index 2d4a618..83becd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "crates/ir", "crates/lang", "crates/svg-filters", + "crates/prowocessing", ] resolver = "2" diff --git a/crates/prowocessing/Cargo.toml b/crates/prowocessing/Cargo.toml new file mode 100644 index 0000000..42d1a80 --- /dev/null +++ b/crates/prowocessing/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "prowocessing" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +image = "0.24.8" +palette = "0.7.4" + +[lints] +workspace = true diff --git a/crates/prowocessing/src/lib.rs b/crates/prowocessing/src/lib.rs new file mode 100644 index 0000000..f83705a --- /dev/null +++ b/crates/prowocessing/src/lib.rs @@ -0,0 +1,4 @@ +//! # This is the image processing library for iOwO +//! +//! One of the design goals for this library is, however, to be a simple, generic image processing library. +//! For now, it's just indev... lets see what comes of it!