A simple C program that converts PNG images to RAW format (tested and used with PS2SDK).
- stb_image.h
- C compiler (GCC recommended)
On Linux or MinGW:
gcc png2raw.c -o png2raw -lmOn Windows (MinGW):
gcc png2raw.c -o png2raw.exe -lm./png2raw file.png output.raw rgb
./png2raw file.png output.raw rgba- The last argument sets the output format:
rgb(24 bits) orrgba(32 bits).
./png2raw texture.png texture.raw rgbaThis will generate a texture.raw file containing the raw pixel data.
- The generated RAW format is useful for homebrew projects, such as with PS2SDK.
- Make sure the input PNG file exists and is accessible.
MIT or public domain (like stb).