Bump RGB crate
This commit is contained in:
parent
3759ca85ec
commit
a2dedcfed2
3 changed files with 7 additions and 7 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -88,9 +88,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytemuck"
|
name = "bytemuck"
|
||||||
version = "1.15.0"
|
version = "1.16.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15"
|
checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
|
|
@ -439,9 +439,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rgb"
|
name = "rgb"
|
||||||
version = "0.8.37"
|
version = "0.8.44"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8"
|
checksum = "1aee83dc281d5a3200d37b299acd13b81066ea126a7f16f0eae70fc9aed241d9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ required-features = ["zopfli"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
zopfli = { version = "0.8.0", optional = true, default-features = false, features = ["std", "zlib"] }
|
zopfli = { version = "0.8.0", optional = true, default-features = false, features = ["std", "zlib"] }
|
||||||
rgb = "0.8.37"
|
rgb = "0.8.43"
|
||||||
indexmap = "2.2.6"
|
indexmap = "2.2.6"
|
||||||
libdeflater = "1.20.0"
|
libdeflater = "1.20.0"
|
||||||
log = "0.4.21"
|
log = "0.4.21"
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn reduced_to_indexed(png: &PngImage, allow_grayscale: bool) -> Option<PngIm
|
||||||
let transparency_pixel = transparent_shade.map(|t| Gray::from(t as u8));
|
let transparency_pixel = transparent_shade.map(|t| Gray::from(t as u8));
|
||||||
pmap.into_iter()
|
pmap.into_iter()
|
||||||
.map(|px| {
|
.map(|px| {
|
||||||
RGB::from(px).alpha(if Some(px) != transparency_pixel {
|
RGB::from(px).with_alpha(if Some(px) != transparency_pixel {
|
||||||
255
|
255
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
|
@ -68,7 +68,7 @@ pub fn reduced_to_indexed(png: &PngImage, allow_grayscale: bool) -> Option<PngIm
|
||||||
let transparency_pixel = transparent_color.map(|t| t.map(|c| c as u8));
|
let transparency_pixel = transparent_color.map(|t| t.map(|c| c as u8));
|
||||||
pmap.into_iter()
|
pmap.into_iter()
|
||||||
.map(|px| {
|
.map(|px| {
|
||||||
px.alpha(if Some(px) != transparency_pixel {
|
px.with_alpha(if Some(px) != transparency_pixel {
|
||||||
255
|
255
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue