mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Tweak std/png's swizzle_low_bit_depth scratch use
This commit is contained in:
1 parent
4d8e179279
commit
f1a27fd980
1 file changed
+1
-2
@@ -827,9 +827,8 @@ pri func decoder.swizzle_low_bit_depth!(dst: slice base.u8, dst_palette: slice b
|
|||||||
this.swizzler.swizzle_interleaved_from_slice!(
|
this.swizzler.swizzle_interleaved_from_slice!(
|
||||||
dst: args.dst,
|
dst: args.dst,
|
||||||
dst_palette: args.dst_palette,
|
dst_palette: args.dst_palette,
|
||||||
src: this.scratch[..])
|
src: this.scratch[.. 1024])
|
||||||
|
|
||||||
// TODO: replace 1024 with this.scratch.length().
|
|
||||||
n = 1024 * args.dst_bytes_per_pixel
|
n = 1024 * args.dst_bytes_per_pixel
|
||||||
if n < args.dst.length() {
|
if n < args.dst.length() {
|
||||||
args.dst = args.dst[n ..]
|
args.dst = args.dst[n ..]
|
||||||
|
|||||||
Reference in new issue
Block a user