Advertisement

read/write image files

Started by January 14, 2004 05:09 PM
0 comments, last by jocko_jonson 21 years, 1 month ago
What''s the easiest way read/write image files in C++? I don''t need to display them, just read or write them pixel by pixel. I don''t really care what image format, just that it works in VC++ 6.0 and WinXP.
but you should care about the imageformat, bmp''s and tgas (i prefer 24bit bmps) are easy to read, but once you want to read jpg, png or some other formats its easier to use some libs like IJG (Independent Jpg Group), they will load jpg, gif, png etc all with the same code. The only think you will have todo is build your loader (reduce the lib stuff to one function by following the faqs of the libs) and you are done.

i use ijg and my code for loading images is some 20-40 lines.


T2k

This topic is closed to new replies.

Advertisement