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

missing 24 bpp surface handling in SDL_MasksToPixelFormatEnum() #102

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

missing 24 bpp surface handling in SDL_MasksToPixelFormatEnum() #102

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, x86

Comments on the original bug report:

On 2008-07-31 10:08:14 +0000, David HENRY wrote:

The function SDL_MasksToPixelFormatEnum() in video/SDL_pixel.c does not handle 24 bpp surfaces. Therefore when loading 24 bit pictures with SDL_image, this function returns always 0...

On 2008-09-21 04:18:17 +0000, David HENRY wrote:

Created attachment 279
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?

On 2009-02-16 21:07:14 +0000, Sam Lantinga wrote:

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!

On 2009-02-16 22:27:18 +0000, David HENRY wrote:

Created attachment 297
24-bits JPEG test image

Here is one of my test images.

On 2009-06-10 03:53:06 +0000, Mike Gorchak wrote:

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.

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

No branches or pull requests

1 participant