I'm currently working on a fun project to restore/remaster old games. To do this I extract imagedata from archive files of old games. Those games use mostly their own format. In my case I have just a byte array where each byte is a pixel. My problem is that the data is converted to png but as a grayscale image.
This is the byte array input.bin.
And this is my current result:
I convert my byte array this via this command:
Code: Select all
convert -depth 8 -colors 256 -size 320x200+0 gray:input.bin output.png
- depth 8 = because 1 byte per pixel
- colors 256 = because each pixel can represent one color of 256
- size 320x200+0 = because the image is 320x200 and +0 because there is no header
- gray: = because I don't know a filter which I can use for this and I think this is the reason for my issue but "rgb:" did not work
Does anyone have a suggestion how I can convert this byte array to a png in color?
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 - Debian GNU/Linux