Converting Images

Converting images to and from .bti is an important and common step in much of Mario Kart: Double Dash!! modding.

Using GCFT
To convert from .bti to .png:
 * 1) Open GameCube File Tools.
 * 2) Go to the "BTI Images" tab.
 * 3) Click on the "Import BTI" button. Then, choose your .bti file. Alternately, drag a .bti file into the window.
 * 4) If the image loads, select the "Export Image" button to save your image as .png.

This process can be tedious if you wish to convert a large number of .bti files. However, this is one method of converting .bti files that were exported from J3dView.

Using wimgt
To convert from .bti to .png using a .bat file (single image): wimgt decode %1
 * 1) Create a new .bat file and copy as its text the text down below.
 * 2) Now, drag the .bti file onto the .bat file, and a .png file with the same name as the .bti file should appear in the directory.

If there is .png file with the same name as the .bti file already, wimgt will not do a conversion unless "-o" is added to the end of the line above.

If you want to change the file name when you convert, replace the last line with wimgt convert %1 -d Being sure the place the with the name and format which you want the converted .bti file to take.

Using GCFT
To convert from .bti to .png:
 * 1) Open GameCube File Tools.
 * 2) Go to the "BTI Images" tab.
 * 3) Click on the "Import Image" button. Then, choose your .png file. Alternately, drag a .bng file into the window.
 * 4) Edit the settings on the right of the window. The options are described here.
 * 5) If the image loads, select the "Export BTI" button to save your image as .bti.

Using wimgt
To convert from .png to .bti using a .bat file (single image): wimgt convert %1 -d %~p1%~n1.bti -x BTI.CMPR --n-mm=0
 * 1) Create a new .bat file and copy as its text the text down below.
 * 2) Now, drag the .bti file onto the .bat file, and a .png file with the same name as the .bti file should appear in the directory.
 * 3) If you are going to use the .bti as a course logo/thumbnail/name or character name, set bytes 0x06 and 0x07 to 0. Alternatively, you can write a script to do this for you.

"BTI.CMPR" forces wimgt to convert the image in the CMPR format. "-n-mm=0" means that 0 mipmaps will be present in the .bti file. Both of these options can be changed by editing the .bat file. In particular, CMPR may be replaced with one of the IA formats to convert an image intended to be grayscale, such as a minimap or character name texture.

Useful .bat files
Conversion .bti <-> .png (depending on the input file): @echo off IF "%~x1"==".png" ( wimgt convert %1 -d %~p1%~n1.bti -x BTI.CMPR --n-mm=0 ) ELSE ( wimgt decode %1 )

Convert all .bti files in the current directory to .png (and delete the original files):

for %%a in ("./*.bti") do ( wimgt decode %%a del %%a )

To avoid the deleting of the original .bti file, get rid of the del %%a line.

Convert all .png in the current directory to .bti:

for %%a in ("./*.png") do ( wimgt encode %%a -d %%~pa%%~na.bti -x BTI.CMPR --n-mm=0 )