fix: incorrect RGB channel ordering in palette mapping#52
Closed
sogladev wants to merge 1 commit into
Closed
Conversation
Corrects the order in which RGB channels are packed and unpacked when converting palette data, ensuring accurate color rendering. Previously, red and blue channels were swapped, causing colors to display incorrectly.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Member
|
I merged this together with an update to the actual comments referencing this to make it a bit more complete. Thanks very much for the submission. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Uncompressed / RAW BLP files are stored in BGRA format. The lib is currently reading these in the wrong order.
[[AI SUMMARY of the changes]]
Corrects the order in which RGB channels are packed and unpacked when converting palette data, ensuring accurate color rendering. Previously, red and blue channels were swapped, causing colors to display incorrectly.
Type of Change
functionality to not work as expected)
Changes Made
Related Issues
Fixes #(issue number)
Closes #(issue number)
Related to #(issue number)
Testing
Tested with uncompressed BLP files in
ITEM/TEXTURECOMPONENTS/Test Cases Added/Modified
Test Results
Tested On
WoW Versions Tested
Quality Assurance
Code Quality
Required Checks
cargo fmt --all- Code is formattedcargo clippy --all-targets --all-features- No clippy warningscargo test --all-features- All tests passcargo test --no-default-features- Tests pass without featurescargo deny check- No security/license issuesCompatibility
Documentation
docs/Benchmarks
Performance Impact
Benchmark Results
Breaking Changes
API Changes
Migration Guide
Security Considerations
Additional Context
https://wowwiki-archive.fandom.com/wiki/BLP_file#Compression
Dependencies
Known Limitations
Screenshots/Examples
Reviewer Notes
Areas of Focus
Questions for Reviewers
By submitting this PR, I confirm that: