You will need to supply some more information. For examply, are you talking about putting images on a web site, or just displaying with the browser?
Firefox, e.g., will open a jpeg directly. e.g. you can do this from a terminal: "firefox filename"
With all this in mind, what exacty to you want to do in C?