Skip to content
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

Add unit test for GdipDrawImageRectRectI #674

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

Add unit test for GdipDrawImageRectRectI #674

wants to merge 1 commit into from

Conversation

qmfrederik
Copy link
Contributor

This adds a unit test for GdipDrawImageRectRectI. It will resize a white rectangle and draw it on top of a black image, and asserts that the result is (more or less) white.

@qmfrederik
Copy link
Contributor Author

I created this test because some of my code started failing when being used with libgdiplus 6.0.4 (which is the default on Ubuntu 20.04 and later).

The libgdiplus 6.0 behavior differs from what GDI+ does (and libgdiplus < 6.0) when you use PixelFormat32bppARGB. I didn't dig deeper into that, as the images which I'm drawing don't have alpha channels and the fix was to just use the RGB pixel format instead of ARGB.

But I did came up with this unit test, and thought it'd be a good addition to the test suite, anyway ;-).

Base automatically changed from master to main March 12, 2021 13:26
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