mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:18:14 +00:00
LibGfx: Zero out dummy filter scanline
As per the PNG specification: "For all x < 0, assume Raw(x) = 0 and Prior(x) = 0. On the first scanline of an image (or of a pass of an interlaced image), assume Prior(x) = 0 for all x."
This commit is contained in:
parent
5e8b5ff35e
commit
f0bd17e610
1 changed files with 1 additions and 0 deletions
|
@ -477,6 +477,7 @@ NEVER_INLINE FLATTEN static bool unfilter(PNGLoadingContext& context)
|
|||
}
|
||||
|
||||
u8 dummy_scanline[context.width * sizeof(RGBA32)];
|
||||
memset(dummy_scanline, 0, sizeof(dummy_scanline));
|
||||
|
||||
for (int y = 0; y < context.height; ++y) {
|
||||
auto filter = context.scanlines[y].filter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue