chore(deps): bump rgb from 0.8.52 to 0.8.53 in the rust-dependencies group (#789)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alejandro González <me@alegon.dev>
This commit is contained in:
parent
2a79fa4c6c
commit
8284676f50
4 changed files with 6 additions and 7 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -484,9 +484,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rgb"
|
name = "rgb"
|
||||||
version = "0.8.52"
|
version = "0.8.53"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce"
|
checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ libdeflater = "1.25.2"
|
||||||
log = "0.4.29"
|
log = "0.4.29"
|
||||||
parse-size = { version = "1.1.0", optional = true }
|
parse-size = { version = "1.1.0", optional = true }
|
||||||
rayon = { version = "1.11.0", optional = true }
|
rayon = { version = "1.11.0", optional = true }
|
||||||
rgb = "0.8.52"
|
rgb = "0.8.53"
|
||||||
rustc-hash = "2.1.1"
|
rustc-hash = "2.1.1"
|
||||||
zopfli = { version = "0.8.3", optional = true, default-features = false, features = ["std", "zlib"] }
|
zopfli = { version = "0.8.3", optional = true, default-features = false, features = ["std", "zlib"] }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ use std::{fs, path::Path, sync::Arc};
|
||||||
use bitvec::bitarr;
|
use bitvec::bitarr;
|
||||||
use libdeflater::{CompressionLvl, Compressor};
|
use libdeflater::{CompressionLvl, Compressor};
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use rgb::ComponentSlice;
|
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
@ -192,7 +191,7 @@ impl PngData {
|
||||||
ColorType::Indexed { palette } => {
|
ColorType::Indexed { palette } => {
|
||||||
let mut palette_data = Vec::with_capacity(palette.len() * 3);
|
let mut palette_data = Vec::with_capacity(palette.len() * 3);
|
||||||
for px in palette {
|
for px in palette {
|
||||||
palette_data.extend_from_slice(px.rgb().as_slice());
|
palette_data.extend_from_slice(px.rgb().as_ref());
|
||||||
}
|
}
|
||||||
write_png_block(b"PLTE", &palette_data, &mut output);
|
write_png_block(b"PLTE", &palette_data, &mut output);
|
||||||
if let Some(last_trns) = palette.iter().rposition(|px| px.a != 255) {
|
if let Some(last_trns) = palette.iter().rposition(|px| px.a != 255) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::hash::{BuildHasherDefault, Hash};
|
use std::hash::{BuildHasherDefault, Hash};
|
||||||
|
|
||||||
use indexmap::IndexSet;
|
use indexmap::IndexSet;
|
||||||
use rgb::{ComponentMap, ComponentSlice, FromSlice, RGB, RGBA, alt::Gray};
|
use rgb::{ComponentMap, FromSlice, RGB, RGBA, alt::Gray};
|
||||||
use rustc_hash::FxHasher;
|
use rustc_hash::FxHasher;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
@ -193,7 +193,7 @@ pub fn indexed_to_channels(
|
||||||
let mut data = Vec::with_capacity(out_size);
|
let mut data = Vec::with_capacity(out_size);
|
||||||
for b in &png.data {
|
for b in &png.data {
|
||||||
let color = palette.get(*b as usize).unwrap_or(&black);
|
let color = palette.get(*b as usize).unwrap_or(&black);
|
||||||
data.extend_from_slice(&color.as_slice()[ch_start..=ch_end]);
|
data.extend_from_slice(&color.as_ref()[ch_start..=ch_end]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(PngImage {
|
Some(PngImage {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue