Archived

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

Dwiel

easy image file formats

Recommended Posts

What is a common file format that is very easy to use? All I want to be able to do is to set each pixel in, lets say a 64*64 image, and save it to a file. I was wondering which format is the easiest to output. I can always convert the image into a different format afterwards... thanx for the help! Tazzel3d ~ dwiel

Share this post


Link to post
Share on other sites
IF you are talking of coding-wise, RLE encoding types are the easiest to understand and encode/decode. Which means BMP and PCX file formats.

Otherwise any good painting program can do conversion between tons of different file formats nowadays...




Sancte Isidore ora pro nobis !

Share this post


Link to post
Share on other sites
Uncompressed is easier than RLE

I recommend using PNG and libpng to do the actual work. It''s quite easy (though it can be a bit verbose at times, usually about a page and a half of code to read/write an image) but it''s very powerful (and supports almost all of PNG''s many features - it better, it''s the reference implementation after all) and it''s quite fast (for all that it has to (de)compress the image and so on).

Plus you can use PNG images straight in your game. There''s not a paint program worth it''s salt out there that doesn''t support PNG images either (though I hear older versions of Photoshop don''t do transparancy well)

Oh, and it''s patent-free


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
quote:
Original post by Tazzel3D
What is a common file format that is very easy to use? All I want to be able to do is to set each pixel in, lets say a 64*64 image, and save it to a file. I was wondering which format is the easiest to output. I can always convert the image into a different format afterwards...

thanx for the help!


Tazzel3d ~ dwiel


I''d say BMP.

Share this post


Link to post
Share on other sites