Jump to content
  • Advertisement

Archived

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

jocko_jonson

read/write image files

This topic is 5248 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
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!