Tool: Image Converter

Current Version: 1.3 (Released with PokeMini 0.5.5)

Convert an image to a data format that can be used on PRC unit

Command-Line

Input file or conf. file must be declared

Usage: pokemini_imgconv [options]
  -tiles              Convert to tiles (def)
  -sprites            Convert to sprites
  -map                Convert to map
  -exmap              Convert to map from external tileset
  -nodither           Disable dither
  -dither             Enable dither (def)
  -nocolorkey         No color key
  -colorkey #FF00FF   Color key (def)
  -metaw 1            Meta-tile width in tiles
  -metah 1            Meta-tile height in tiles
  -nometashl          Don't shift map index for meta (def)
  -metashl            Shift map index left for meta-tiles
  -rawf               Output in raw format (def)
  -asmf               Output in asm format
  -cf                 Output in C format
  -autohf             Autodetect correct header format (def)
  -asmhf              Output header in asm format
  -chf                Output header in C format
  -separated          Separate data to each file (def)
  -joined             Join all data into a single file
  -i img.png          Image input
  -c img.txt          Conf. file input
  -o img.raw          Output file
  -og img2.raw        Output file (grey)
  -ots img.raw        Output tileset file
  -otsg img2.raw      Output tileset file (grey)
  -om map.raw         Output map indexes file
  -oh img.inc         Output header file
  -vo img             Variable name for output
  -vog imgg           Variable name for grey output
  -vots imgts         Variable name for tileset output
  -votsg imgtsg       Variable name for tileset grey output
  -vom map            Variable name for map indexes
  -idofs 0            Map index offset
  -idsize 0           Map index size (0=Unlimited)
  -maxtiles 65536     Maximum number of tiles
  -dt 96              Dark threhold, lower lum. will be full dark
-lt 192 Light threhold, higher lum. will be full light
-q Quiet -v Verbose

Supported input images are:

Conf. file

Command-line will take priority over the configuration file.

Keys in bold have multiple definitions with the same value, hover the mouse over to see the list

Key Example declaration Command-line equivalent Description
gfx gfx=tiles -tiles Convert to tiles
  gfx=sprites -sprites Convert to sprites
  gfx=map -map Convert to map
  gfx=exmap -exmap Convert to map from external tileset
dither dither=no -nodither Disable dither (def)
  dither=yes -dither Enable dither
colorkey colorkey=-1 -nocolorkey No color key
  colorkey=#FF00FF -colorkey #FF00FF Color key
metaw metaw=1 -metaw 1 Meta-tile width in tiles
metah metah=1 -metah 1 Meta-tile height in tiles
metashl metashl=no -nometashl Don't shift map index for meta (def)
  metashl=yes -metashl Shift map index left for meta-tiles
format format=raw -rawf Output in raw format
  format=asm -asmf Output in asm format
  format=c -cf Output in C format
headerformat headerformat=auto -autohf Autodetect correct header format (def)
  headerformat=asm -asmhf Output header in asm format
  headerformat=c -chf Output header in C format
joined joined=no -separated Separate data to each file (def)
  joined=yes -joined Join all data into a single file
img img=img.png -i img.png Image input
out out=img.raw -o img.raw Output file
outgrey outgrey=imgg.raw -og imgg.raw Output file (grey)
outtileset outtileset=imgts.raw -ots img.raw Output tileset file
outtilesetgrey outtilesetgrey=imgtsg.raw -otsg imgg.raw Output tileset file (grey)
outmap outmap=map.raw -om map.raw Output map indexes file
outheader outheader=img.inc -oh img.inc Output header file
vout vout=img -vo img Variable name for output
voutgrey voutgrey=img2 -vog img2 Variable name for grey output
voutmap voutmap=map -vom map Variable name for map indexes
idofs idofs=0 -idofs 0 Map index offset
idsize idsize=0 -idsize 0 Map index size (0=Unlimited)
maxtiles maxtiles=65536 -maxtiles 65536 Maximum number of tiles
dt dt=96 -dt 96 Dark threhold, lower lum. will be full dark
lt lt=192 -lt 192 Light threhold, higher lum. will be full light

Tiles format

Image will be converted to PRC Map format (from top-left to bottom-right), meta-tiles dimension will affect how the graphics are stored

tileset, colorkey, idofs and idsize are ignored

Application: Converting tiles

Sprites format

Image will be converted to PRC Sprites format (from top-left to bottom-right), meta-tiles dimension is always 2x2 (16x16 pixels) and cannot be changed

Color key will define the color to be used for transparency if the image doesn't have alpha channel

tileset, metaw, metah, metashl, idofs and idsize are ignored

Application: Converting sprites

Map format

Image will be converted to PRC Tiles format (from top-left to bottom-right) while duplicated tiles aren't saved, meta-tiles dimension will affect how the graphics and map are stored

Map indexes will point to the meta-tile (or 1st tile offset if metashl is enabled) of the output

tileset and colorkey are ignored

Application: Converting an image (or sequence of images)

External map format

Image will be converted to PRC Tiles format (from top-left to bottom-right), meta-tiles dimension will affect how the graphics and map are stored

Tileset will be converted in the same way and will be used for map indexing

If certain tile on the image isn't found on the tileset, the tool will raise an error with the pixels position of the image

Map indexes will point to the meta-tile (or 1st tile offset if metashl is enabled) of the tileset

colorkey is ignored

Application: Converting a map with shared tiles