Skip to content

Conversation

@nkronlage
Copy link
Contributor

This adds a test to verify the image returned by toDataURL with a premultipliedAlpha=false canvas is the correct orientation.

This was suggested by:
https://bugs.webkit.org/show_bug.cgi?id=156129

I ran the test on Chrome/FireFox and got:

testing 16 by 16 attributes: {"premultipliedAlpha":false}
PASS should be 0,255,0,255
PASS should be 255,0,0,255
PASS should be 0,0,255,255

And got this on Safari:

testing 16 by 16 attributes: {"premultipliedAlpha":false}
FAIL should be 0,255,0,255
at (0, 0) expected: 0,255,0,255 was 255,0,0,255
FAIL should be 255,0,0,255
at (0, 8) expected: 255,0,0,255 was 0,255,0,255
PASS should be 0,0,255,255

@CLAassistant
Copy link

CLAassistant commented May 31, 2020

CLA assistant check
All committers have signed the CLA.

@nkronlage nkronlage changed the title Add tests to verify toDataURL images are the correct orientation Add tests to verify toDataURL images are the correct orientation for premultiplyAlpha=false May 31, 2020
@kdashg
Copy link
Contributor

kdashg commented Jun 1, 2020

Thanks for this addition! I'm fine to merge it without the changes, but it'd be nice to do these fixups. Let me know which you'd prefer!

@nkronlage
Copy link
Contributor Author

Updated the PR with changes requested. Take another look and let me know if there's anything else. Thanks!

@kdashg
Copy link
Contributor

kdashg commented Jun 2, 2020

Thanks!

@kdashg kdashg merged commit fd4489e into KhronosGroup:master Jun 2, 2020
@nkronlage nkronlage deleted the to-data-premultiply-false-test branch June 2, 2020 22:15
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.

3 participants