Skip to content

Conversation

@radarhere
Copy link
Member

Currently, I;16 horizontal lines draw the same value to both 8-bit parts, rather than using the full 16 bits.

pixelwidth = strncmp(im->mode, "I;16", 4) == 0 ? 2 : 1;
memset(
im->image8[y0] + x0 * pixelwidth, (UINT8)ink, (x1 - x0 + 1) * pixelwidth
);

@radarhere radarhere changed the title Correct drawing I;16 lines Correct drawing I;16 horizontal lines May 30, 2025
@radarhere radarhere force-pushed the i16 branch 2 times, most recently from 4dd6d8c to a8569da Compare May 30, 2025 11:52
@hugovk hugovk merged commit 056dc89 into python-pillow:main Jun 10, 2025
64 of 66 checks passed
@radarhere radarhere deleted the i16 branch June 10, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants