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 - Add a function to load an XPM image directly as a RGB888 surface
Summary: Add a function to load an XPM image directly as a RGB888 surface
Status: WAITING
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-04 14:16 UTC by Sylvain
Modified: 2017-11-05 10:47 UTC (History)
0 users

See Also:


Attachments
path (2.65 KB, patch)
2017-11-04 14:16 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.