Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #8952

#535 added code to remove padding between bands.

for (i = 1; i < bands; i++) { // note -- skipping first band
memmove(
&state->buffer[i * state->xsize],
&state->buffer[i * stride],
state->xsize
);
}

However, that didn't consider that there might be padding between lines for interleaved data, like the P;4L image from the issue.

I've created the test image using Pillow and manual hexediting.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hugovk hugovk merged commit 8ccdc39 into python-pillow:main Jun 11, 2025
75 of 76 checks passed
@radarhere radarhere deleted the pcx_padding branch June 11, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants