Open an image in C++

I have recently been trying to learn C++, and I have some of the basics down, but I cannot for the life of me find out how to open an image. I am trying to make a side-scroller, and I just can't figure out how to do it, but for now, I just want to open an image. Preferably in a simple way. FYI, I'm using Visual Studio.
Last edited on
closed account (E0p9LyTq)
ISO standard C++ doesn't understand anything dealing with graphics, that requires a third-party library.

Windows has "built-in" support with graphics in the Windows SDK, there are other cross-platform libraries that work in OSes other than Windows.

Simple DirectMedia Layer (SDL):
https://www.libsdl.org/

Simple and Fast Multimedia Library (SFML):
http://www.sfml-dev.org/

If you are going to concentrate on programming strictly for Windows there is DirectX:
https://msdn.microsoft.com/en-us/library/windows/desktop/ee663274(v=vs.85).aspx

For (relatively) simple picture and text manipulation there is C++ class-based GDI+:
https://msdn.microsoft.com/en-us/library/vs/alm/ms533798(v=vs.85).aspx

Windows GDI and GDI+ have been superseded by Direct2D:
https://msdn.microsoft.com/en-us/library/vs/alm/dd372349(v=vs.85).aspx
Topic archived. No new replies allowed.