Fix alpha left and right
This commit is contained in:
parent
5429f63227
commit
77e981ff6f
1 changed files with 2 additions and 2 deletions
|
|
@ -149,8 +149,8 @@ fn reduced_alpha_to_left(png: &PngImage, bpc: usize, bpp: usize) -> Vec<u8> {
|
|||
line_bytes.resize(line_bytes.len() + bpc, 0);
|
||||
} else {
|
||||
line_bytes.extend_from_slice(pixel);
|
||||
last_pixel = pixel.to_owned();
|
||||
}
|
||||
last_pixel = pixel.to_owned();
|
||||
}
|
||||
reduced.push(line.filter);
|
||||
reduced.extend(line_bytes.chunks(bpp).rev().flatten());
|
||||
|
|
@ -169,8 +169,8 @@ fn reduced_alpha_to_right(png: &PngImage, bpc: usize, bpp: usize) -> Vec<u8> {
|
|||
reduced.resize(reduced.len() + bpc, 0);
|
||||
} else {
|
||||
reduced.extend_from_slice(pixel);
|
||||
last_pixel = pixel.to_owned();
|
||||
}
|
||||
last_pixel = pixel.to_owned();
|
||||
}
|
||||
}
|
||||
reduced
|
||||
|
|
|
|||
Loading…
Reference in a new issue