Sign in to follow this  
hurstshifter

Load_BMP vs. IMG_Load

Recommended Posts

hurstshifter    136
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
rip-off    10976
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
Poobah    122
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

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