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

Fix BMP issues #1497

Merged
merged 6 commits into from
Dec 9, 2019
Merged

Fix BMP issues #1497

merged 6 commits into from
Dec 9, 2019

Conversation

Hakerh400
Copy link
Contributor

Fixes #1492
Fixes #1495

  • Have you updated CHANGELOG.md?

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
### Changed
### Added
### Fixed
* Fix BMP issues.

Choose a reason for hiding this comment

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

I would describe what BMP issues there were. It would add more clarity.

Copy link
Collaborator

@zbjornson zbjornson left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and for watching out for the image files!

blue = (val >> 8) << 3;
green = ((val >> 13) | (val << 3)) << 3;
red = (val >> 2) << 3;
alpha = 255;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this just RGB555? (I Googled the comment line and got no results :))

What you have is fine with me if you're short on time, but if it's indeed RGB555 I think you can simplify it by constructing val in the other byte order (untested):

val = U1UC();
val |= U1UC() << 8;
red = (val >> 10) << 3;
green = (val >> 5) << 3;
blue = val << 3;

Copy link
Collaborator

@zbjornson zbjornson left a comment

Choose a reason for hiding this comment

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

Looks great :)

@zbjornson zbjornson merged commit 1e1e336 into Automattic:master Dec 9, 2019
@Hakerh400 Hakerh400 deleted the bmp branch December 9, 2019 20:10
@zbjornson zbjornson mentioned this pull request Jul 17, 2020
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.

BMPs generated from the DSTWO flashcard do not work BMPs made from Super Smash Bros Crusaids don't work
3 participants