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

BMP Color issue #530

Merged
merged 3 commits into from
Aug 9, 2018
Merged

BMP Color issue #530

merged 3 commits into from
Aug 9, 2018

Conversation

hipstersmoothie
Copy link
Collaborator

@hipstersmoothie hipstersmoothie commented Aug 9, 2018

What's Changing and Why

bmp-js outputs the buffer in AGBR. This PR will convert bmp bitmap data to RGBA on encode and back to AGBR on encode. https://github.com/shaozilee/bmp-js

closes #521

pretty sure it also closes #432

What else might be affected

bmp file handling.

Tasks

  • Add tests
  • Update Documentation
  • Update jimp.d.ts
  • Add SemVer Label

…BR so we have to switch on encode and decode
@hipstersmoothie hipstersmoothie added the bug there is a bug in the way jimp behaves label Aug 9, 2018
@edi9999 edi9999 merged commit a5bdf02 into jimp-dev:master Aug 9, 2018
@shawntabrizi
Copy link

@hipstersmoothie I believe I am running into this very issue right now using JIMP v0.9.3.

I read from a BMP, and make repeating writes to the file.

The writes are actually setting a batch of pixel values using the bitmap.setPixelColour(color, x, y); call.

What I notice is that every other write operation, the colors turn "red" like described in the issue. Then, the next write it turns back to normal.

I am wondering if the code somehow converts from AGBR -> RGBA and then back on a repating loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug there is a bug in the way jimp behaves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting PNG to BMP makes everything red Jimp read bmp to base64 results in wrong colours
3 participants