easy image file formats

Started by
6 comments, last by Dwiel 21 years, 8 months ago
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
Advertisement
I think BMP is the easiest format.
Using DevIL it''s easy to save in the following formats: bmp dds jpeg pcx png pnm raw sgi tga tiff pal
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 !
-----------------------------Sancte Isidore ora pro nobis !
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.
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.
Patrick
I seem to remember that TGA is potentially one of the simplest formats.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
.RAW is really much more simple than any of those.

This topic is closed to new replies.

Advertisement