mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +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
Notes:
sideshowbarker
2024-07-18 20:39:36 +09:00
Author: https://github.com/IdanHo
Commit: f0bd17e610
Pull-request: https://github.com/SerenityOS/serenity/pull/6181
Issue: https://github.com/SerenityOS/serenity/issues/6180
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