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

Added support for BGR, BGR565, BGRA4444 and BGRA5551 #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DummkopfOfHachtenduden
Copy link

@DummkopfOfHachtenduden DummkopfOfHachtenduden commented Dec 6, 2022

I added support for a bunch of BGR/A formats that I need for a project of mine. I've also fixed what I consider a bug where DecodeInternal relies on dwMipMapCount being set correctly when DDS_HEADER_FLAGS_MIPMAP is not set.

There is one rather weird case where I have an image that uses B5G5R5 but has no DdpfAlphaPixels flag and dwABitMask = 0. I'm not exactly sure how to go about this. Visual Studio detects this as B5G5R5A1. I'm doing the same but right now this results in a completely transparent image since the RawDecoder is missing context for this.

- Added RawEncoders for Bgr, Bgr565, Bgra4444 and Bgra5551
- Added tests for Bgr, Bgr565, Bgra4444 and Bgra5551
- Fixed DecodeInternal relying on dwMipMapCount being set correctly when DDS_HEADER_FLAGS_MIPMAP is not set.
@DummkopfOfHachtenduden DummkopfOfHachtenduden changed the title Adding support for BGR, BGR565, BGRA4444 and BGRA5551 Added support for BGR, BGR565, BGRA4444 and BGRA5551 Dec 7, 2022
@DummkopfOfHachtenduden DummkopfOfHachtenduden marked this pull request as ready for review December 7, 2022 13:42
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