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

Clarify toBuffer('raw') byte ordering #1421

Merged
merged 1 commit into from May 31, 2019
Merged

Conversation

zbjornson
Copy link
Collaborator

Fixes #1416

  • Have you updated CHANGELOG.md?

types/index.d.ts Outdated
* Returns the raw ARGB data without encoding in native-endian byte order,
* top-to-bottom.
* Returns the raw ARGB data without encoding, top-to-bottom. On big-endian
* platforms, the data will instead be BGRA.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is a bit confusing.
Shouldn't LE be BGRA, and BE be ARGB?
As I read the text, it gives me the impression that it's the other way around

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! thank you

@zbjornson zbjornson merged commit 126760a into Automattic:master May 31, 2019
@zbjornson zbjornson deleted the zb/1416 branch May 31, 2019 23:03
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.

toBuffer() returns bgra
3 participants