mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGfx: Fix partial loading of tall and interlaced PNG files
The function stopped copying data from a subimage when the _y_ value exceeded the image _width_ value, resulting in an incomplete image.
This commit is contained in:
committed by
Andreas Kling
parent
b8c847a3cd
commit
970a3ef4d8
@@ -850,7 +850,7 @@ static ErrorOr<void> decode_adam7_pass(PNGLoadingContext& context, Streamer& str
|
||||
|
||||
// Copy the subimage data into the main image according to the pass pattern
|
||||
for (int y = 0, dy = adam7_starty[pass]; y < subimage_context.height && dy < context.height; ++y, dy += adam7_stepy[pass]) {
|
||||
for (int x = 0, dx = adam7_startx[pass]; x < subimage_context.width && dy < context.width; ++x, dx += adam7_stepx[pass]) {
|
||||
for (int x = 0, dx = adam7_startx[pass]; x < subimage_context.width && dx < context.width; ++x, dx += adam7_stepx[pass]) {
|
||||
context.bitmap->set_pixel(dx, dy, subimage_context.bitmap->get_pixel(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user