Skip to content

pixel: fix Image[Monochrome].Set for larger images #683

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

Merged
merged 1 commit into from
May 25, 2024

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented May 25, 2024

For bigger images, the pixel index might not fit in a int16. Therefore, int is needed during the calculation.

While fixing this bug, I've added a few tests that verify the Image implementation by creating images, filling them with random data, and then checking whether they still contain the same data. This test failed before the patch.

For bigger images, the pixel index might not fit in a int16. Therefore,
int is needed during the calculation.

While fixing this bug, I've added a few tests that verify the Image
implementation by creating images, filling them with random data, and
then checking whether they still contain the same data. This test failed
before the patch.
aykevl added a commit to aykevl/tinygl that referenced this pull request May 25, 2024
This test needs tinygo-org/drivers#683 to pass,
but I think it's a useful test regardless.
@deadprogram
Copy link
Member

Thanks for the fix @aykevl looks good. Now merging.

@deadprogram deadprogram merged commit 7d98364 into dev May 25, 2024
1 check passed
@deadprogram deadprogram deleted the pixel-fix-monochrome branch May 25, 2024 15:09
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