I am using Visual Studio 2013 and can't install any libraries(for school purposes)... I would like to display an image of any extension as long as it is an image (jpg/png/bmp...) I've been looking around forever now and just want to put display an image in my application. I am also open to displaying an HTML file with a picture inside of that, but can't seem to find anything that works with that... Any help would be appreciated!

Recommended Answers

All 7 Replies

Can you copy a single file onto the computer? No installation needed, no installer to run, just a single header file?

Yes I can, but only if that file can be placed within my program files (in the location containing my c file)

The CImg library is a single header file, and allows you to show a picture in a window.

@Moschops
I think that CImg would still be considered a "library" for purposes of this student's exercise.

@ameer
I think that displaying a png image would be your best bet as it is open source and structure is well documented. You will need to do some research and determine how to decode and display it, which is what I would think is the purpose of this exercise. Good luck! When you have made some progress and need some help, then post your code and we'll be happy to help.

Using a library and decoding an image yourself are two totally different things.

The OP cannot change his compiler's environment, but there is never any restriction on the files you can create for a single-user directory (outside of diskspace, of course).

Using CImg would work fine.

(I know this is old. Has OP solved his problem?)

You could run an external program that shows the image.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.