Advertisement Jump to content


This topic is now archived and is closed to further replies.


read/write image files

This topic is 5483 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post

Link to post
Share on other sites
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.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!