From 713a51b74d21d082d7c6a0085758d282372d35b2 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 29 Nov 2023 19:09:05 -0500 Subject: [PATCH] Upgarde to v0.10 spreet crate, cleanup SpreetResult (#984) --- Cargo.lock | 267 ++++++++++-------- Cargo.toml | 2 +- justfile | 7 +- martin/src/sprites/mod.rs | 82 +++--- tests/expected/configured/spr_cmp.png | Bin 829 -> 785 bytes tests/expected/configured/spr_cmp.png.txt | 2 +- tests/expected/configured/spr_cmp_2x.png | Bin 1540 -> 1567 bytes tests/expected/configured/spr_mysrc.png | Bin 265 -> 189 bytes tests/expected/configured/spr_mysrc.png.txt | 2 +- tests/expected/configured/spr_mysrc_2x.png | Bin 399 -> 344 bytes .../expected/configured/spr_mysrc_2x.png.txt | 2 +- tests/expected/configured/spr_src1.png | Bin 805 -> 758 bytes tests/expected/configured/spr_src1.png.txt | 2 +- tests/expected/configured/spr_src1_2x.png | Bin 1486 -> 1515 bytes tests/fixtures/sprites/expected/all_1.png | Bin 829 -> 785 bytes tests/fixtures/sprites/expected/all_2.png | Bin 1540 -> 1567 bytes tests/fixtures/sprites/expected/src1_1.png | Bin 805 -> 758 bytes tests/fixtures/sprites/expected/src1_2.png | Bin 1486 -> 1515 bytes tests/fixtures/sprites/expected/src2_1.png | Bin 265 -> 189 bytes tests/fixtures/sprites/expected/src2_2.png | Bin 399 -> 344 bytes 20 files changed, 201 insertions(+), 165 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 371f968e..1af17666 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "atomic-write-file" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c232177ba50b16fe7a4588495bd474a62a9e45a8e4ca6fd7d0b7ac29d164631e" +checksum = "9ae364a6c1301604bbc6dfbf8c385c47ff82301dd01eef506195a029196d8d04" dependencies = [ "nix", "rand", @@ -827,7 +827,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] @@ -913,9 +913,9 @@ dependencies = [ [[package]] name = "data-url" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deadpool" @@ -1085,12 +1085,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1222,16 +1222,16 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8d8cbea8f21307d7e84bca254772981296f058a1d36b461bf4d83a7499fc9e" +checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.19.2", + "ttf-parser", ] [[package]] @@ -1612,20 +1612,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "image" -version = "0.24.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-rational 0.4.1", - "num-traits", - "png", -] - [[package]] name = "imagesize" version = "0.12.0" @@ -1640,7 +1626,6 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "rayon", "serde", ] @@ -1652,6 +1637,7 @@ checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.3", + "rayon", "serde", ] @@ -1737,9 +1723,9 @@ checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -1788,18 +1774,18 @@ checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libdeflate-sys" -version = "0.11.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6784b6b84b67d71b4307963d456a9c7c29f9b47c658f533e598de369e34277" +checksum = "67921a7f85100c1559efc3d1c7c472091b7da05f304b4bbd5356f075e97f1cc2" dependencies = [ "cc", ] [[package]] name = "libdeflater" -version = "0.11.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e285aa6a046fd338b2592c16bee148b2b00789138ed6b7bb56bb13d585050d" +checksum = "3a31b22f662350ec294b13859f935aea772ba7b2bc8776269f4a5627308eab7d" dependencies = [ "libdeflate-sys", ] @@ -1966,9 +1952,9 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" -version = "0.6.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" dependencies = [ "libc", ] @@ -1982,15 +1968,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -2045,15 +2022,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "cfg-if", "libc", - "memoffset 0.7.1", - "pin-utils", ] [[package]] @@ -2075,7 +2050,7 @@ dependencies = [ "num-complex", "num-integer", "num-iter", - "num-rational 0.2.4", + "num-rational", "num-traits", ] @@ -2138,17 +2113,6 @@ dependencies = [ "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" @@ -2198,16 +2162,14 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "oxipng" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630638e107fb436644c300e781d3f17e1b04656138ba0d40564be4be3b06db32" +checksum = "28e5c341ef78a228e47a551bfd15ff885d8c501af49f953358763a538c01f14d" dependencies = [ "bitvec", "crossbeam-channel", "filetime", - "image", - "indexmap 1.9.3", - "itertools 0.10.5", + "indexmap 2.1.0", "libdeflater", "log", "rayon", @@ -2749,9 +2711,9 @@ checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" [[package]] name = "resvg" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6554f47c38eca56827eea7f285c2a3018b4e12e0e195cc105833c008be338f1" +checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" dependencies = [ "gif", "jpeg-decoder", @@ -2790,9 +2752,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", "getrandom", @@ -2813,9 +2775,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3211b01eea83d80687da9eef70e39d65144a3894866a5153a2723e425a157f" +checksum = "af6c4b23d99685a1408194da11270ef8e9809aff951cc70ec9b17350b087e474" dependencies = [ "const-oid", "digest", @@ -2915,7 +2877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.6", "rustls-webpki", "sct", ] @@ -2947,23 +2909,23 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] [[package]] name = "rustybuzz" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162bdf42e261bee271b3957691018634488084ef577dddeb6420a9684cab2a6a" +checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" dependencies = [ "bitflags 1.3.2", "bytemuck", "smallvec", - "ttf-parser 0.18.1", + "ttf-parser", "unicode-bidi-mirroring", "unicode-ccc", - "unicode-general-category", + "unicode-properties", "unicode-script", ] @@ -3003,7 +2965,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] @@ -3281,9 +3243,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -3291,9 +3253,9 @@ dependencies = [ [[package]] name = "spreet" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73c2f90a7b1281c08144af5dc91f2e32fdc4752d764aa4ff95c224f7b51502c" +checksum = "746a092a2a126455fd4ad7709ef449d3ef5e7bb1929d339a7b1de22d8b58214b" dependencies = [ "crunch", "multimap", @@ -3302,6 +3264,7 @@ dependencies = [ "resvg", "serde", "serde_json", + "thiserror", ] [[package]] @@ -3592,9 +3555,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "svgtypes" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4b0611e7f3277f68c0fa18e385d9e2d26923691379690039548f867cef02a7" +checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" dependencies = [ "kurbo", "siphasher", @@ -3713,9 +3676,9 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" +checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222" dependencies = [ "arrayref", "arrayvec", @@ -3728,9 +3691,9 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" +checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647" dependencies = [ "arrayref", "bytemuck", @@ -3917,12 +3880,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "ttf-parser" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" - [[package]] name = "ttf-parser" version = "0.19.2" @@ -3959,12 +3916,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" -[[package]] -name = "unicode-general-category" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -3980,6 +3931,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f91c8b21fbbaa18853c3d0801c78f4fc94cdb976699bb03e832e75f7fd22f0" + [[package]] name = "unicode-script" version = "0.5.5" @@ -4047,9 +4004,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "usvg" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d09ddfb0d93bf84824c09336d32e42f80961a9d1680832eb24fdf249ce11e6" +checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" dependencies = [ "base64", "log", @@ -4062,9 +4019,9 @@ dependencies = [ [[package]] name = "usvg-parser" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19bf93d230813599927d88557014e0908ecc3531666d47c634c6838bc8db408" +checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" dependencies = [ "data-url", "flate2", @@ -4080,9 +4037,9 @@ dependencies = [ [[package]] name = "usvg-text-layout" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035044604e89652c0a2959b8b356946997a52649ba6cade45928c2842376feb4" +checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" dependencies = [ "fontdb", "kurbo", @@ -4096,9 +4053,9 @@ dependencies = [ [[package]] name = "usvg-tree" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7939a7e4ed21cadb5d311d6339730681c3e24c3e81d60065be80e485d3fc8b92" +checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" dependencies = [ "rctree", "strict-num", @@ -4154,9 +4111,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4164,9 +4121,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", @@ -4179,9 +4136,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4189,9 +4146,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", @@ -4202,15 +4159,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -4302,6 +4259,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -4332,6 +4298,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4344,6 +4325,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4356,6 +4343,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4368,6 +4361,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4380,6 +4379,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4392,6 +4397,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4404,6 +4415,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4416,6 +4433,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "wyz" version = "0.5.1" @@ -4480,9 +4503,9 @@ checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zopfli" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0650ae6a051326d798eb099b632f1afb0d323d25ee4ec82ffb0779512084d5" +checksum = "5c1f48f3508a3a3f2faee01629564400bc12260f6214a056d06a3aaaa6ef0736" dependencies = [ "crc32fast", "log", diff --git a/Cargo.toml b/Cargo.toml index fcd34f26..390db30c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ serde_json = "1" serde_with = "3" serde_yaml = "0.9" size_format = "1.0.2" -spreet = { version = "0.9", default-features = false } +spreet = { version = "0.10", default-features = false } sqlite-hashes = { version = "0.5", default-features = false, features = ["md5", "window", "hex"] } sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio"] } subst = { version = "0.3", features = ["yaml"] } diff --git a/justfile b/justfile index 19173505..19bcb8a3 100644 --- a/justfile +++ b/justfile @@ -155,13 +155,16 @@ test-int: clean-test install-sqlx fi # Run integration tests and save its output as the new expected output -bless: restart clean-test bless-insta-martin bless-insta-mbtiles +bless: restart clean-test bless-tests bless-insta-martin bless-insta-mbtiles rm -rf tests/temp - cargo test -p martin --features bless-tests tests/test.sh rm -rf tests/expected mv tests/output tests/expected +# Run test with bless-tests feature +bless-tests: + cargo test -p martin --features bless-tests + # Run integration tests and save its output as the new expected output bless-insta-mbtiles *ARGS: (cargo-install "cargo-insta") #rm -rf mbtiles/tests/snapshots diff --git a/martin/src/sprites/mod.rs b/martin/src/sprites/mod.rs index d2e2f88a..6326168a 100644 --- a/martin/src/sprites/mod.rs +++ b/martin/src/sprites/mod.rs @@ -6,13 +6,17 @@ use std::path::PathBuf; use futures::future::try_join_all; use log::{info, warn}; use serde::{Deserialize, Serialize}; -use spreet::fs::get_svg_input_paths; use spreet::resvg::usvg::{Error as ResvgError, Options, Tree, TreeParsing}; -use spreet::sprite::{sprite_name, Sprite, Spritesheet, SpritesheetBuilder}; +use spreet::{ + get_svg_input_paths, sprite_name, SpreetError, Sprite, Spritesheet, SpritesheetBuilder, +}; use tokio::io::AsyncReadExt; +use self::SpriteError::{SpriteInstError, SpriteParsingError, SpriteProcessingError}; use crate::file_config::{FileConfigEnum, FileResult}; +pub type SpriteResult = Result; + #[derive(thiserror::Error, Debug)] pub enum SpriteError { #[error("Sprite {0} not found")] @@ -34,13 +38,16 @@ pub enum SpriteError { UnableToReadSprite(PathBuf), #[error("{0} in file {}", .1.display())] - SpriteProcessingError(spreet::error::Error, PathBuf), + SpriteProcessingError(SpreetError, PathBuf), #[error("{0} in file {}", .1.display())] SpriteParsingError(ResvgError, PathBuf), #[error("Unable to generate spritesheet")] UnableToGenerateSpritesheet, + + #[error("Unable to create a sprite from file {}", .0.display())] + SpriteInstError(PathBuf), } #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] @@ -87,20 +94,23 @@ impl SpriteSources { Ok(results) } - pub fn get_catalog(&self) -> FileResult { + pub fn get_catalog(&self) -> SpriteResult { // TODO: all sprite generation should be pre-cached - Ok(self - .0 - .iter() - .map(|(id, source)| { - let mut images = get_svg_input_paths(&source.path, true) - .into_iter() - .map(|svg_path| sprite_name(svg_path, &source.path)) - .collect::>(); - images.sort(); - (id.clone(), CatalogSpriteEntry { images }) - }) - .collect()) + let mut entries = SpriteCatalog::new(); + for (id, source) in &self.0 { + let paths = get_svg_input_paths(&source.path, true) + .map_err(|e| SpriteProcessingError(e, source.path.clone()))?; + let mut images = Vec::with_capacity(paths.len()); + for path in paths { + images.push( + sprite_name(&path, &source.path) + .map_err(|e| SpriteProcessingError(e, source.path.clone()))?, + ); + } + images.sort(); + entries.insert(id.clone(), CatalogSpriteEntry { images }); + } + Ok(entries) } fn add_source(&mut self, id: String, path: PathBuf) { @@ -123,7 +133,7 @@ impl SpriteSources { /// Given a list of IDs in a format "id1,id2,id3", return a spritesheet with them all. /// `ids` may optionally end with "@2x" to request a high-DPI spritesheet. - pub async fn get_sprites(&self, ids: &str) -> Result { + pub async fn get_sprites(&self, ids: &str) -> SpriteResult { let (ids, dpi) = if let Some(ids) = ids.strip_suffix("@2x") { (ids, 2) } else { @@ -137,7 +147,7 @@ impl SpriteSources { .get(id) .ok_or_else(|| SpriteError::SpriteNotFound(id.to_string())) }) - .collect::, SpriteError>>()?; + .collect::>>()?; get_spritesheet(sprite_ids.into_iter(), dpi).await } @@ -152,7 +162,7 @@ async fn parse_sprite( name: String, path: PathBuf, pixel_ratio: u8, -) -> Result<(String, Sprite), SpriteError> { +) -> SpriteResult<(String, Sprite)> { let on_err = |e| SpriteError::IoError(e, path.clone()); let mut file = tokio::fs::File::open(&path).await.map_err(on_err)?; @@ -161,31 +171,31 @@ async fn parse_sprite( file.read_to_end(&mut buffer).await.map_err(on_err)?; let tree = Tree::from_data(&buffer, &Options::default()) - .map_err(|e| SpriteError::SpriteParsingError(e, path.clone()))?; + .map_err(|e| SpriteParsingError(e, path.clone()))?; - Ok((name, Sprite { tree, pixel_ratio })) + let sprite = Sprite::new(tree, pixel_ratio).ok_or_else(|| SpriteInstError(path.clone()))?; + + Ok((name, sprite)) } pub async fn get_spritesheet( sources: impl Iterator, pixel_ratio: u8, -) -> Result { +) -> SpriteResult { // Asynchronously load all SVG files from the given sources - let sprites = try_join_all(sources.flat_map(|source| { - get_svg_input_paths(&source.path, true) - .into_iter() - .map(|svg_path| { - let name = sprite_name(&svg_path, &source.path); - parse_sprite(name, svg_path, pixel_ratio) - }) - .collect::>() - })) - .await?; - + let mut futures = Vec::new(); + for source in sources { + let paths = get_svg_input_paths(&source.path, true) + .map_err(|e| SpriteProcessingError(e, source.path.clone()))?; + for path in paths { + let name = sprite_name(&path, &source.path) + .map_err(|e| SpriteProcessingError(e, source.path.clone()))?; + futures.push(parse_sprite(name, path, pixel_ratio)); + } + } + let sprites = try_join_all(futures).await?; let mut builder = SpritesheetBuilder::new(); - builder - .sprites(sprites.into_iter().collect()) - .pixel_ratio(pixel_ratio); + builder.sprites(sprites.into_iter().collect()); // TODO: decide if this is needed and/or configurable // builder.make_unique(); diff --git a/tests/expected/configured/spr_cmp.png b/tests/expected/configured/spr_cmp.png index fdd2c95dc8ca98b6d7884f207536009067c42ba5..ffb3546925d2136c95e615982d07ad025b0077b1 100644 GIT binary patch delta 772 zcmV+f1N;2F29XAk8Gi-<005;8o>>3@0@z7JK~#9!?N&`_6G0T-t5zikJ$UkuLXsjx z=*5!@da)j|*eoqoXsAdjDv2P4V672RK@cM*silW3QUnoAs9q{!a?ncYA$tj;mqa`i z57K%pD9?H2?XnJrWtmqJ!4E!mXXbs$`)1zEtkw>oX`_NA!GES85bM+zZ>M{6cYNr@ zuy3;Wu|;uywYY&nzoj#`ZaWWaEe_aVj@vK~!*tv-QoOJ(>}DZ)a= ztQO3^SkVk0%O|37B)(%Gj$sVOqGn-gc!SGCNe}|^zUBeWE+&S2d+#C?%;>NDU>N?! znW4i!m*=jz@qei8kO`MLjZn#$4V>l0TjwZYe=g5W0cswP>#M3Jl7gT}!>Rjcmrt$u z8t@QTZGPf-1GOq9LV{}yMw%L-Fc`^Uf`OQbq*YfVt7<}Cm4}INErkqj`}5*F+)RzZgR7UY?Gi6eJgzxz^d#%?ODH8{A(7-4O1Ldw-#P!0 z^Fy)4V1J^eNywX#iKXJ?MmrN99%X)D8FCsiI9G!O|zM$KA<>*N6T+wot{n`1S^;b zwQZ_>-4m~?Y57t2{BVp;8Ou{5O&U*AzmsrHP0J7PyxX453eqzqok*aj<%caTwL5Em z<7!%d7*rB*YR9Rq`;9AUnIX>-&{OvtSJM7R7veWEY1+w8yORk30000`T@Ck7Ra_1)){0CAD3`eJA zPmj=;8mbLsPYczU9HIeaObO9~$U?|HUFkpuggqrxb84{Wln_mjW(EeJdbmoUIFLOh z7$gEAA!>l+rpi!=Vj#J?&>OA=$lXvGx}h>;Nv89z_Eco?ovq31%7PZ9JFKq^frtYY zAD>ZqY+Bi-nuzJ)x>G~7ULITjc>l6nJD1$tFzxi(nI~u0o}68CWJ<}t-W;IzEp^eG z>!K!B=dR56YR*rZpJX{R%CIfo1?aX$Pi3H)F(#5;S|TQzO4_Q5s-j$cJlwq8oIqPL zIx=*DlygatUoeA!fPlP$fq}h)gTKFjKtOnWLPBPKK|y^(Lqq?B3G?SKSg>IIhW+~w z95{Xc{DliwuU@@=|Nesq51&7O`~Llhk3WC@`RlA4EddPrPEQxdkcwM-FJ%V5GLT?> zP^=%bKFl}dj<`#~LarSl1Hi&;#NKxQ7SeHewYTDtn=C8ru6rMwZ~8Hjb=xAPE`wj?E{Dt5bIueB`*>B>#;u)q zeW^@?u4nyeF%{3nqHBKaZ2s6$I8#}efDIR9UqF!cb$$ap2VU4F8hAApH%&EZN78+H|+SZI1(7g44$rjF6*2U FngHO!OPBxv diff --git a/tests/expected/configured/spr_cmp.png.txt b/tests/expected/configured/spr_cmp.png.txt index 85e2609b..e0a783b8 100644 --- a/tests/expected/configured/spr_cmp.png.txt +++ b/tests/expected/configured/spr_cmp.png.txt @@ -1 +1 @@ -tests/output/configured/spr_cmp.png: PNG image data, 50 x 31, 8-bit colormap, non-interlaced +tests/output/configured/spr_cmp.png: PNG image data, 50 x 31, 8-bit/color RGBA, non-interlaced diff --git a/tests/expected/configured/spr_cmp_2x.png b/tests/expected/configured/spr_cmp_2x.png index 31167b4f31899f01631d1fe20b6998864a528288..e1ce6514bfef7520f22e378a4d87aece82c7f688 100644 GIT binary patch delta 1087 zcmV-F1i<@*44({;_y((TO`Tshk^UYe$C!DPQz-uc00000*RGSHWIUo~J)&km)T@u3 zUpJLiE84P{lSTno2ANtgnOQKCodHV-i|L$Z0001dlkfpaf7{yM-{0Wi;O6h|@A2^P z@bmNb`TP6({Qv*||NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|Ns8}GVBl$000A%NklsK2^7zXf1c1u#I#dyhLqm)u(ZEOoFB(^~$5|m0Y5u(-VHdw1ssiA5?2|A)v z>-|!F|6q3}f147P?9SVq9FHIR`}XEJ$&=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qryUQDWV42`A1dqP5^@+RV z%5`zJ9~{=QG+4Hv^_>x(&Bg~;RKt7q^)2%~h5s*+-|?cjYfJ1H?ZpMlpeM41FMCga zSlNgU3%xR7xK_O}wA}Gr4WXkvc?!UOQ>(*bG8Q_UCIwxjvCM*Ovyh2({)~BOM20j> zVkA4OpHbP7MCfPCK_fDx-AmIm(Bedfw0m(X+wcsOi5x@Py=h7TND*D6oFVOAN^R{^ zL{G-lJ!a{3QtJ30kd^CfyyFVfNG9M^A%X-Y?@;3`m3tw(LD zL(}TD4v^DtkfcI%3N9jDr8kwz{_N0&W)_|9v!qyz>)&_gW)_`-t4K-sl2i;*&e7>U zHhv1eJf(wkbP6uJLMdotRI!6|bP6_yXzDOMED dLwe8u(ZAi)xd;R(9&C|E}ZL-!()&ku6((b=948%XJp9e{)_Y&S&yf+&?Lb|Lg*`?Gv@% yTNr6c-0Cx2*__F^LMJ;XM|oOcA*bH|KOY$%PhttUwBSev$U~m4elF{r5}E)>6iu`M diff --git a/tests/expected/configured/spr_mysrc.png.txt b/tests/expected/configured/spr_mysrc.png.txt index 9be03516..e8185f01 100644 --- a/tests/expected/configured/spr_mysrc.png.txt +++ b/tests/expected/configured/spr_mysrc.png.txt @@ -1 +1 @@ -tests/output/configured/spr_mysrc.png: PNG image data, 15 x 15, 8-bit colormap, non-interlaced +tests/output/configured/spr_mysrc.png: PNG image data, 15 x 15, 8-bit gray+alpha, non-interlaced diff --git a/tests/expected/configured/spr_mysrc_2x.png b/tests/expected/configured/spr_mysrc_2x.png index c5269e3201467167b7d5b1d8efdd0e539dbccdab..7c947fd364eebb22bbc03f31683d44387bcec788 100644 GIT binary patch delta 328 zcmV-O0k{5-1K0wP8Gi%-005CWW+?yw0Ut?3K~#9!?NdPw!!Qgy2!T)tWw1gBgg_XB zhQS753|0mmgO_;O>x|BQv!%Y;Y%B-BB@~)O0QCQz<(D6^q9owp5GRC6s=)E z!BZyQ`!tDtxy8tWmV76?aZ#l*oQ@Sl9oUQpl&UClH<*EeS(ERXtAX)nWSD75CgOr- z(u)GX_(l@iL^5boC!wGwMHD>rSQOJJ&{ih@^d>Wjh54r$={O;AC!WP56RmhJo>{iS z%HqLoo`&34FdxwC8g8GL32@BS5*ni;sh5HZQfB60C(l4Nz+nz3tAr-gIP6*69tRTQDZ}DKp zwqtE9=l}XgH3o)Se%U>fKjGV3FYPaOISiil8-peNbF&UqX!Skvd*ID$-J^T-O10L5 z_UN;d(kg_$o;ssedtf>1;`kY=2e%#Aa!AKjZi3k5<6LtO8G5cO`K;UeBIOTXinb+# zzW8g+;2BqMZ#etD@dnq?7d6|K&bxE<&NjEVEUI%gTe~DWM4f@0pBy diff --git a/tests/expected/configured/spr_mysrc_2x.png.txt b/tests/expected/configured/spr_mysrc_2x.png.txt index 826bb740..c0878039 100644 --- a/tests/expected/configured/spr_mysrc_2x.png.txt +++ b/tests/expected/configured/spr_mysrc_2x.png.txt @@ -1 +1 @@ -tests/output/configured/spr_mysrc_2x.png: PNG image data, 30 x 30, 8-bit colormap, non-interlaced +tests/output/configured/spr_mysrc_2x.png: PNG image data, 30 x 30, 8-bit gray+alpha, non-interlaced diff --git a/tests/expected/configured/spr_src1.png b/tests/expected/configured/spr_src1.png index 8880b9cb4e6303926df8de0614301a97278ef4cd..b3c301e8271c15e67ee8cc03248ad96fd6c5fe1e 100644 GIT binary patch delta 745 zcmVW6*X8 z6?XAtK`+ijgKOBB!pcO(P-z7j1m~=X3W8WMt&SZMWC$YKGQCX1_MnroLvk6Smqt7c z53+e2C_mpX{9cJ!LX1t?%YN`BdGGz+d!PK?@BJcp83@8ClYh$8WCD^-eHpKLZ|{x| zy_`I~`Yb;HH95QTLAkKc%NNJc2Yst@_6N>&0}(ldkI+YS&PSMU^{4QCu?nAS6_}T$ zdRgjARiyYaC7aBk@E!Yb41LfS=gdzHZ#ZF8CJ3neg3a)2aRb!5dl#WBC4Vb}ad6Y4 zp~JtHX0NsUaer>RFkB^ptR_n<_|*%y&e6vHTAG~#obzNny~<&7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n5|N z-v~UicH)&uclx^~8m<3#_K{_wUEx)sDU1a>yjdC*z8?@hnY4FV>zyu<^PleSN$>tF zGV{t64vzbuC)7kLnzHt7;(E5KQ>Slg0Fz6zGT)Qt2M<0>QLjsiV{|aFl%2SWf8Q#l j<;IH&eJ6gF|I1J@X~Qo0{f<9?amnE6>gTe~DWM4f!2eFU diff --git a/tests/expected/configured/spr_src1.png.txt b/tests/expected/configured/spr_src1.png.txt index c4191fec..4ca89307 100644 --- a/tests/expected/configured/spr_src1.png.txt +++ b/tests/expected/configured/spr_src1.png.txt @@ -1 +1 @@ -tests/output/configured/spr_src1.png: PNG image data, 36 x 31, 8-bit colormap, non-interlaced +tests/output/configured/spr_src1.png: PNG image data, 36 x 31, 8-bit/color RGBA, non-interlaced diff --git a/tests/expected/configured/spr_src1_2x.png b/tests/expected/configured/spr_src1_2x.png index f39bce52f42d6ee6f7e57755548a4acfb453716d..c291da9581d0adef937f54f08f1510c6b9526f73 100644 GIT binary patch delta 463 zcmX@d{hE8i54P1szH{TvCjOICIX^HbY!TF3O&YV+C68J{CQKg-(dxH;EQbmR3E&C`ra&Q8xW;ZL0I zd{%m2N$)(@(+xeGt9cIWxbk6YYSpua4>v#GqTcr2+WGXpOBKS$JOvX)7+3v1#U6ht zFTcLd*6cG*R{PQ5hE zU#DxnV)3s}x1LQ-V4fEK@nV0@p6@5wG}k-K5)4aY@R@b{xi#OPtx0*if+u{s_S(IE z!sGRS1fJBq@HWca$X+Ptad*}s{{NG8G<@Bvxtf}{!(Cp*{<*`yP`rAzopr0D1lQd;kCd delta 413 zcmV;O0b>5^3(gCW_y(O{Hmhh#8G zv~iBliCyMSCa}vaH5+R;>w{?XSpDW&qe-)EF%_}bsDqX>bj_D;)DK~oL-iZJbd8=x z%Ycjts|>)n)by1Vdgh_wv*)xYhVMH=E56cv6UIpqVH5#s_{s-g(r#~man)BEgur)EglYIl0 zJ^9g(Y`pi$CMmB#nh{oJ08Eqmc(>3@0@z7JK~#9!?N&`_6G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-FJ%V5GLT?> zP^=%bKFl}dj<`#~LarSl1Hi&;#NKxQ7SeHewYTDtn=C8ru6rMwZ~8Hjb=xAPE`wj?E{Dt5bIueB`*>B>#;u)q zeW^@?u4nyeF%{3nqHBKaZ2s6$I8#}efDIR9UqF!cb$$ap2VU4F8hAApH%&EZN78+H|+SZI1(7g44$rjF6*2U FngHO!OPBxv diff --git a/tests/fixtures/sprites/expected/all_2.png b/tests/fixtures/sprites/expected/all_2.png index 31167b4f31899f01631d1fe20b6998864a528288..e1ce6514bfef7520f22e378a4d87aece82c7f688 100644 GIT binary patch delta 1087 zcmV-F1i<@*44({;_y((TO`Tshk^UYe$C!DPQz-uc00000*RGSHWIUo~J)&km)T@u3 zUpJLiE84P{lSTno2ANtgnOQKCodHV-i|L$Z0001dlkfpaf7{yM-{0Wi;O6h|@A2^P z@bmNb`TP6({Qv*||NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|Ns8}GVBl$000A%NklsK2^7zXf1c1u#I#dyhLqm)u(ZEOoFB(^~$5|m0Y5u(-VHdw1ssiA5?2|A)v z>-|!F|6q3}f147P?9SVq9FHIR`}XEJ$&=Zc>;`+q9-BNjE2W&BJT`!UQx`>J=@0@A zEj7fOr@&?%TaaxQPQ=h=Ues%AHyXp(rx{TyGpen*)vO zuIH+F4jf5c5mZXTcd_m&Rq^b@qi4=)PmbPyT2x)7fBqI2PRJ1BXc9G7`S2^z?wv2M zxJpgH?3@fWX+hauQ|tIl>~qcatT9T)WrRs6OB-IthUj43E7_Q5bVSPNqq@Cbt&5Io z)%ER%V33psdiRGfi4fn2OT#d*O46WY>Ersc2=V-VFv&=x2`I0L5YsS;Nro7JArT5D zPe_Ige}Lm6)DR3xl3@YBNfGJ@qCFs427qay?ELYwXt{MuG#xiyEtZj1$qz)rca!KQ zujB>ElD)H%KYtOvo!hr}cqJvtGOJ2Lm`fzne^O#NUA-zfB7EQd`VV=2|5mgd>{&^_ z&^AB*iG1&Wx+#=bVK66I<^W9lPmk}Z>F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;E8(wBWMS9`xDvuokgjEe?F z7gc$FXwPjDXTIn3{0#qOt*(WOxE5YoP*qe`S6EnQw({~Z(Uuj78+jKvXKp^nw(h;g z+Y@eG4D40ip5K3I3K$$)@!{R(iN6+#Uw-~LP>{p8+ce?whQNtwVulMc`X8lzxt4xt z`Ho8siPIY+UVWW$Vfw`0r=@yY761FEk!RL0XYa|x#?r61_0QR_xR+||a3}Mz zhkZcR=RYo*xvh*WbNU#9)xTU9^jZ3G8B5~RNqjLn2bNgba9H>3-7@=Z+4PN}Gn5|N z-v~UicH)&uclx^~8m<3#_K{_wUEx)sDU1a>yjdC*z8?@hnY4FV>zyu<^PleSN$>tF zGV{t64vzbuC)7kLnzHt7;(E5KQ>Slg0Fz6zGT)Qt2M<0>QLjsiV{|aFl%2SWf8Q#l j<;IH&eJ6gF|I1J@X~Qo0{f<9?amnE6>gTe~DWM4f!2eFU diff --git a/tests/fixtures/sprites/expected/src1_2.png b/tests/fixtures/sprites/expected/src1_2.png index f39bce52f42d6ee6f7e57755548a4acfb453716d..c291da9581d0adef937f54f08f1510c6b9526f73 100644 GIT binary patch delta 463 zcmX@d{hE8i54P1szH{TvCjOICIX^HbY!TF3O&YV+C68J{CQKg-(dxH;EQbmR3E&C`ra&Q8xW;ZL0I zd{%m2N$)(@(+xeGt9cIWxbk6YYSpua4>v#GqTcr2+WGXpOBKS$JOvX)7+3v1#U6ht zFTcLd*6cG*R{PQ5hE zU#DxnV)3s}x1LQ-V4fEK@nV0@p6@5wG}k-K5)4aY@R@b{xi#OPtx0*if+u{s_S(IE z!sGRS1fJBq@HWca$X+Ptad*}s{{NG8G<@Bvxtf}{!(Cp*{<*`yP`rAzopr0D1lQd;kCd delta 413 zcmV;O0b>5^3(gCW_y(O{Hmhh#8G zv~iBliCyMSCa}vaH5+R;>w{?XSpDW&qe-)EF%_}bsDqX>bj_D;)DK~oL-iZJbd8=x z%Ycjts|>)n)by1Vdgh_wv*)xYhVMH=E56cv6UIpqVH5#s_{s-g(r#~man)BEgur)EglYIl0 zJ^9g(Y`pi$CMmB#nh{oJ08Eqmc(R(9&C|E}ZL-!()&ku6((b=948%XJp9e{)_Y&S&yf+&?Lb|Lg*`?Gv@% yTNr6c-0Cx2*__F^LMJ;XM|oOcA*bH|KOY$%PhttUwBSev$U~m4elF{r5}E)>6iu`M diff --git a/tests/fixtures/sprites/expected/src2_2.png b/tests/fixtures/sprites/expected/src2_2.png index c5269e3201467167b7d5b1d8efdd0e539dbccdab..7c947fd364eebb22bbc03f31683d44387bcec788 100644 GIT binary patch delta 328 zcmV-O0k{5-1K0wP8Gi%-005CWW+?yw0Ut?3K~#9!?NdPw!!Qgy2!T)tWw1gBgg_XB zhQS753|0mmgO_;O>x|BQv!%Y;Y%B-BB@~)O0QCQz<(D6^q9owp5GRC6s=)E z!BZyQ`!tDtxy8tWmV76?aZ#l*oQ@Sl9oUQpl&UClH<*EeS(ERXtAX)nWSD75CgOr- z(u)GX_(l@iL^5boC!wGwMHD>rSQOJJ&{ih@^d>Wjh54r$={O;AC!WP56RmhJo>{iS z%HqLoo`&34FdxwC8g8GL32@BS5*ni;sh5HZQfB60C(l4Nz+nz3tAr-gIP6*69tRTQDZ}DKp zwqtE9=l}XgH3o)Se%U>fKjGV3FYPaOISiil8-peNbF&UqX!Skvd*ID$-J^T-O10L5 z_UN;d(kg_$o;ssedtf>1;`kY=2e%#Aa!AKjZi3k5<6LtO8G5cO`K;UeBIOTXinb+# zzW8g+;2BqMZ#etD@dnq?7d6|K&bxE<&NjEVEUI%gTe~DWM4f@0pBy