We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3942

Summary: Add a function to load an XPM image directly as a RGB888 surface
Product: SDL_image Reporter: Sylvain <sylvain.becker>
Component: miscAssignee: Sam Lantinga <slouken>
Status: WAITING --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: All   
OS: All   
Attachments: path

Description Sylvain 2017-11-04 14:16:43 UTC
Created attachment 3066 [details]
path

It would be nice to have a function that loads directly an XPM image as RGB888 surface. Path already exists in SDL_image. so the patch is almost only to expose this as a function.
(remove also MAX macro un-used).
Comment 1 Sam Lantinga 2017-11-05 05:05:08 UTC
What's the use case for this?
Comment 2 Sylvain 2017-11-05 10:47:19 UTC
My use case is probably marginal. 
I have a few xpm files that I rescale linearly at run-time, so I need something else that a palette format.
So, this function prevents a call to SDL_ConvertFormat() to converting them out of a palletized format. 
Moreover, this way, surfaces are also immediately in the natural renderer pixel format.