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

SDL_LoadBMP loads 8-bit images incorrectly #838

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

SDL_LoadBMP loads 8-bit images incorrectly #838

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: Linux, x86

Comments on the original bug report:

On 2013-04-18 05:30:10 +0000, driedfruit wrote:

Created attachment 1115
patch to fix the issue

Since the change to SDL_Color to allow the alpha component, SDL_LoadBMP_RW handles alpha for 8-bit palletized images incorrectly.

4th byte in the RGBQUAD structure is always zero, not the alpha.

As seen here
http://msdn.microsoft.com/en-us/library/windows/desktop/dd162938(v=vs.85).aspx
or here
http://msdn.microsoft.com/en-us/library/aa922960.aspx

Note: there might be similar problems in other image formats in SDL_image.

On 2013-04-18 07:10:32 +0000, Martin Gerhardy wrote:

isn't this obsolete since http://hg.libsdl.org/SDL/rev/1fa727447de3 ?

On 2013-04-18 07:26:01 +0000, driedfruit wrote:

Oh, absolutely. Terribly sorry for not noticing that.

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