Jump to content
  • Advertisement
Sign in to follow this  
hurstshifter

Load_BMP vs. IMG_Load

This topic is 3504 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
Advertisement
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
Guest
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!