mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-01 22:37:10 -06:00
#3692: rebase onto main — rustfmt after the merge
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
3cffe22c00
commit
3ee1978910
@@ -246,10 +246,8 @@ fn decode_alpha(bytes: &[u8], decoded: &mut u64) -> Result<Option<Alpha>, OverBu
|
||||
return Ok(None);
|
||||
}
|
||||
// Only the header is read here (a PNG's `tRNS` counts as transparency).
|
||||
let has_alpha = image::ImageReader::with_format(std::io::Cursor::new(bytes), pic.format)
|
||||
.into_decoder()
|
||||
.ok()
|
||||
.is_some_and(|d| d.color_type().has_alpha());
|
||||
let has_alpha =
|
||||
image::ImageReader::with_format(std::io::Cursor::new(bytes), pic.format).into_decoder().ok().is_some_and(|d| d.color_type().has_alpha());
|
||||
if !has_alpha {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user