PDA

View Full Version : dot TOIF (that other image format)



wraggster
October 24th, 2010, 23:41
News via http://thatotherdev.wordpress.com/2010/10/23/dot-toif-that-other-image-format/

I was having some trouble with image loading on PS3 so I wrote a simple program using SDL to convert PNG files into something easier to work with.

To use it just place the file you want to convert into the same folder as PNGtoTOIF.exe, rename the file to image.png, then run PNGtoTOIF.exe and it should generate a image.toif file based on it.

The first line in the resulting file is the image width, second is image height, next is the red then green then blue then alpha values for each pixel. Each variable is stored as human readable text. The files are incredibly bloated (it makes uncompressed BMPs seem tiny) but its a functional solution and was easy to make.

Its worth noting that Cubicle Shooter v0.3 (which is what this was primarily made for) is hard coded to only load a 64×64 image to use as its texture for the cubicle dwelling NPCs. So you will probably run into problems if you try to just replace that texture with a differently sized one. I’ve already fixed up the toif texture loading function though and it will be part of the games next update.