Skip to content

Commit

Permalink
Bump RGB crate
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jul 9, 2024
1 parent 3759ca8 commit eb8f674
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ required-features = ["zopfli"]

[dependencies]
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"
libdeflater = "1.20.0"
log = "0.4.21"
Expand Down
4 changes: 2 additions & 2 deletions src/reduction/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
pmap.into_iter()
.map(|px| {
RGB::from(px).alpha(if Some(px) != transparency_pixel {
RGB::from(px).with_alpha(if Some(px) != transparency_pixel {
255
} else {
0
Expand All @@ -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));
pmap.into_iter()
.map(|px| {
px.alpha(if Some(px) != transparency_pixel {
px.with_alpha(if Some(px) != transparency_pixel {
255
} else {
0
Expand Down

0 comments on commit eb8f674

Please sign in to comment.