The SNES (video game console) stores it's images (known as "tiles") in a format of grayscale images (or "raw data" if you can call it that) with colors from 00 - 0F. Actual color is assigned in-game using palettes. I'm trying to replicate the way the SNES stores it's tiles; 16-color/16-gray images with zero overhead.
The program I use to view the tile data claims it's 4bpp. Here's an image of the program for reference: http://i.imgur.com/mEWoY7o.png
It's colored because a random palette has been assigned to the image, but as you can see, it appears to just be data from 00-0F to define the images. Now here's my problem: I don't know how to make an actual usable 16-color image file without overhead. I don't want any compression, no headers, no footers. I just want pure color index (00 through 0F representing grayscale colors for example) data I can use.
This program works great for converting, for example, a black and white bmp to 8 bytes (pure binary image). Now just think that except instead of 0 and 1 it's 0 through 16 which is 00 through 0F in hex.
According to my calculations, the file should be 640 bytes if it's 4bpp and is 80x16.
Unforunately, when saving as a bmp from photoshop, it's 716 bytes. Not a problem, I thought, I can run it through ImageMagick.
It came out as 714 bytes when trying to set the depth to 4. It also comes out as 714 when using -colors 16.
I was actually able to use
Code: Select all
convert test.bmp gray:test.bmp
Please help!