| Summary: | missing 24 bpp surface handling in SDL_MasksToPixelFormatEnum() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | David HENRY <tfc.duke> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | mike |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | All | ||
| Attachments: |
fix 24 bpp image handling in SDL_MasksToPixelFormatEnum()
24-bits JPEG test image |
||
|
Description
David HENRY
2008-07-31 10:08:14 UTC
Created attachment 279 [details]
fix 24 bpp image handling in SDL_MasksToPixelFormatEnum()
I attached a little patch to add 24 bpp image handling in SDL_MasksToPixelFormatEnum(), but this raises a new issue: this function
doesn't handle endianess at all.
Is it normal? Or am I doing it wrong in my application when creating my
texture from an SDL surface?
Can you attach a sample image? You're right, endianness needs to be taken into account, but I can take care of that once I have a test case. Thanks! Created attachment 297 [details]
24-bits JPEG test image
Here is one of my test images.
I commited a fix for this issue today. But one problem is still persist: RGB24 and BGR24 doesn't have masks, so it is impossible to determine by bpp in SDL_MasksToPixelFormatEnum() function which format to return: RGB24 or BGR24. |