8000 Correct drawing I;16 horizontal lines by radarhere · Pull Request #8985 · python-pillow/Pillow · GitHub
[go: up one dir, main page]

Skip to content

Correct drawing I;16 horizontal lines #8985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
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.

1 participant
0