mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 02:13:12 +00:00
M2: use fixed-size pixel chunks in oracle decoder (#2342)
Keep RGBA decoding unchanged while satisfying the current Clippy lint. Include the separately verified Rustls 0.23.46 lock prerequisite. Co-authored-by: sanyamsingh001 <314051937+sanyamsingh001@users.noreply.github.com> Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Generated
+2
-2
@@ -5411,9 +5411,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.23.45"
|
||||
version = "0.23.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
||||
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"log",
|
||||
|
||||
@@ -186,7 +186,7 @@ pub fn decode_pam_gray(bytes: &[u8]) -> Option<(usize, usize, Vec<u8>)> {
|
||||
return None;
|
||||
}
|
||||
let mut out = Vec::with_capacity(width.checked_mul(height)?);
|
||||
for px in data.get(..wanted)?.chunks_exact(4) {
|
||||
for px in data.get(..wanted)?.as_chunks::<4>().0 {
|
||||
let (&r, &g, &b, &a) = (px.first()?, px.get(1)?, px.get(2)?, px.get(3)?);
|
||||
// Composite premultiplied RGB over white, in integer arithmetic that cannot overflow:
|
||||
// each term is at most 255, and the sum is at most 255.
|
||||
|
||||
Reference in New Issue
Block a user