| 1 |
Image conversion programs for Ironseed: |
| 2 |
|
| 3 |
- .scr and .pal |
| 4 |
TEMP/*.scr + TEMP/*.pal (uncompressed 320x200 256-color images, with palette files) |
| 5 |
created/loaded by quicksavescreen() and quickloadscreen() |
| 6 |
|
| 7 |
- .cpr |
| 8 |
data/*.cpr, TEMP/*.cpr (compressed 320x200 images used by game) |
| 9 |
|
| 10 |
- .ppm |
| 11 |
standard interchanged format, can be P6 (binary) or P3 (ASCII) - see ppm(5) manual page for more info |
| 12 |
|
| 13 |
- icons.vga (and main.pal PALETTE) |
| 14 |
81 icons of 17x15 pixels |
| 15 |
|
| 16 |
Quick HOWTO: |
| 17 |
|
| 18 |
- convert "foobar.cpr" to "foobar.png" |
| 19 |
cpr2scr foobar # creates foobar.scr and foobar.pal from foobar.cpr |
| 20 |
scr2ppm.pl foobar.scr foobar.pal # creates foobar.ppm from foobar.scr and foobar.pal |
| 21 |
convert -gamma 1.2 -resize 200% foobar.ppm foobar.png # example ImageMagick6 conversion with color correction and size increase |
| 22 |
|
| 23 |
- convert "barbaz.png" to "barbaz.cpr" |
| 24 |
convert barbaz.png barbaz.ppm # creates barbaz.ppm in P6 PPM binary format from barbaz.png |
| 25 |
ppm2scr.pl barbaz.ppm # creates barbaz.scr and barbaz.pal from barbaz.ppm |
| 26 |
scr2cpr barbaz # creates barbaz.cpr from barbaz.scr and barbaz.pal |
| 27 |
|
| 28 |
- convert "icons.vga" and "main.pal" to "icons.png" |
| 29 |
icons2ppm.pl data/icons.vga data/main.pal | convert - Graphics_Assets/icons.png |
| 30 |
|
| 31 |
- convert "icons.png" to "icons.vga" using aux. "main.pal" |
| 32 |
convert Graphics_Assets/icons.png ppm:- | Data_Generators/misc/ppm2icons.pl data/main.pal > data/icons.vga |
| 33 |
|
| 34 |
- convert foo.cpr to foo.png, while preserving color palette (needed for end*.cpr and many others!) - see https://unix.stackexchange.com/a/609049/64590 |
| 35 |
cpr2tga foo && convert foo.tga tiff:- | gm convert - foo.png |
| 36 |
(i.e. it also needs graphicsmagick) |
| 37 |
|
| 38 |
- FIXME document *tga* and helper shell scripts, make cpr_to_png and png_to_cpr (tga2cpr needed too) which preserve palette |