diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-05-01 20:39:00 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-05-01 20:39:00 +0200 |
| commit | 433d742183eb4e4a9290c0b889bad6dc747dc06c (patch) | |
| tree | d5f35d6ca4809bfbabf346d9e8c3f9ff2e239786 | |
| parent | b845db16187dc8d609932a0e473e11f53ae31ef7 (diff) | |
Fix Paeth for bit depth < 8.
| -rw-r--r-- | core/image/png/png.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/image/png/png.odin b/core/image/png/png.odin index cfbeb43f5..41ea8e625 100644 --- a/core/image/png/png.odin +++ b/core/image/png/png.odin @@ -1362,7 +1362,7 @@ defilter_less_than_8 :: proc(params: ^Filter_Params) -> (ok: bool) #no_bounds_ch dest[i] = (src[i] + paeth) & 255; } for k in 0..nk { - paeth := filter_paeth(dest[k], up[channels], up[k]); + paeth := filter_paeth(dest[k], up[channels+k], up[k]); dest[channels+k] = (src[channels+k] + paeth) & 255; } case: |