tags:

views:

228

answers:

1

What is the code in 'c' to display a picture file like jpeg file or bmp file or pcx file. For example the picture may be available in desktop and the program during execution must be given the path of the file as input and should display the image.(If it is in command line,it'll be excellent).

Platform:Windows xp

Turbo c compiler(or turboc++)

+1  A: 

Well, you'll definitely want to take a look at libjpeg:

http://en.wikipedia.org/wiki/Libjpeg

Working with bmp files is actually pretty easy, since there isn't any compression to deal with:

http://en.wikipedia.org/wiki/BMP_file_format

tomlogic
And working with netpbm (http://netpbm.sourceforge.net/) is even easier than bmp.
Tadeusz A. Kadłubowski