cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How to Display Image in C++
How to Display Image in C++
Apr 10, 2021 at 7:49am UTC
Thompson423
(1)
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
Apr 12, 2021 at 3:26am UTC
Apr 10, 2021 at 8:15am UTC
salem c
(3700)
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.