How to Display Image in C++

Hi!
I'm trying to write a function in C++ to show an image on the screen.
How could I do that?
I have already created a .JPG image but I was unable to use it inside a C++ software.
Please, explain me.
Thanks in advance!


https://www.targetehr.me/
Last edited on
Which OS are you using?
Which compiler / IDE are you using?

Do you want to do all the maths yourself - shouldn't take more than a year or two.
https://en.wikipedia.org/wiki/JPEG

Or do you want to use a library that just gives you the pixels?
https://en.wikipedia.org/wiki/Libjpeg

Same goes for the display side.
Do you want to write each pixel yourself, or do you want to use a library to do some (or all) of the work for you?

Many GUI toolkits provide the means to display an image from a file, with very little code on your part.
https://docs.wxwidgets.org/trunk/classwx_image.html
Topic archived. No new replies allowed.