Sign in to follow this  

Load_BMP vs. IMG_Load

This topic is 3147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any reason to use the Load_BMP function instead of the IMG_Load function? (Aside from needing to include the sdl_image header and lib files). It seems to me that being able to load multiple image formats renders the Load_BMP function utterly useless.

Share this post


Link to post
Share on other sites
Once you have allowed for SDL_Image as a dependency then yes, there is no point calling SDL_LoadBMP() anywhere because you are only limiting yourself as to what formats you accept. But SDL_LoadBMP() has value, after I would guess that if you passed a bitmap file name to IMG_Load() it would fall back to SDL_LoadBMP(), so its not useless.

Share this post


Link to post
Share on other sites
IMG_Load appears to load BMP files at least a bit better than SDL_LoadBMP, too. One example is that if you have a 32-bit BMP file (which I think is against the format's standards), IMG_Load will load in the 4th channel, whereas SDL_LoadBMP ignores it.

Share this post


Link to post
Share on other sites

This topic is 3147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this