<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mariogalaxy.org/w/index.php?action=history&amp;feed=atom&amp;title=BTI</id>
	<title>BTI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mariogalaxy.org/w/index.php?action=history&amp;feed=atom&amp;title=BTI"/>
	<link rel="alternate" type="text/html" href="https://mariogalaxy.org/w/index.php?title=BTI&amp;action=history"/>
	<updated>2026-04-19T12:30:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mariogalaxy.org/w/index.php?title=BTI&amp;diff=44&amp;oldid=prev</id>
		<title>Lord-Giganticus: bti added</title>
		<link rel="alternate" type="text/html" href="https://mariogalaxy.org/w/index.php?title=BTI&amp;diff=44&amp;oldid=prev"/>
		<updated>2022-08-14T19:29:52Z</updated>

		<summary type="html">&lt;p&gt;bti added&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
BTI is an image file format similar to TEX0, TPL and BREFT file formats. The only difference is the file header.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
The file format is very simple and starts with a file header followed by the image data. All data is written in [[big endian]].&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
The following table shows the file header. It is 0x20 bytes long. There is no magic to identify BTI files,&lt;br /&gt;
so tools may do some plausibility checks to identify them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;textbox grid alt center&amp;quot; style=&amp;quot;border:1px; solid:#aaaaaa; max-width:743px&amp;quot; rules=all&lt;br /&gt;
|- style=background:lightgray&lt;br /&gt;
! colspan=3 | File Header (&amp;#039;&amp;#039;Table inspired off of [http://wiki.tockdom.com/wiki/BTI_(File_Format)#File_Header this]&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|- style=background:#f2f2f2&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Image format&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Enable alpha&amp;#039;&amp;#039;&amp;#039; (0x00 means alpha is disabled, anything higher means alpha is enabled)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Width&amp;#039;&amp;#039;&amp;#039; of the image in pixels&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Height&amp;#039;&amp;#039;&amp;#039; of the image in pixels&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Byte || &amp;#039;&amp;#039;&amp;#039;Wrap S&amp;#039;&amp;#039;&amp;#039;[http://www.amnoid.de/gc/bti.txt] (0x01 for posteffect.bti, 0x00 for others). Probably repeat, clamp or mirror wraps for U projection maps&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Byte || &amp;#039;&amp;#039;&amp;#039;Wrap T&amp;#039;&amp;#039;&amp;#039;[http://www.amnoid.de/gc/bti.txt] (0x01 for posteffect.bti, 0x00 for others). Probably repeat, clamp or mirror wraps for V projection maps&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Palette format&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of palette entries&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Offset to palette data&amp;#039;&amp;#039;&amp;#039;, relative to the start of the file header&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Boolean || &amp;#039;&amp;#039;&amp;#039;Mipmap Enable&amp;#039;&amp;#039;&amp;#039; Whether the texture will use mipmaps or not&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || Boolean || &amp;#039;&amp;#039;&amp;#039;EnableEdgeLOD&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Boolean || &amp;#039;&amp;#039;&amp;#039;Clamp LOD Bias&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || Boolean || &amp;#039;&amp;#039;&amp;#039;Max Anisotropy&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Byte || &amp;#039;&amp;#039;&amp;#039;Minification filter type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || Byte || &amp;#039;&amp;#039;&amp;#039;Magnification filter type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Byte || &amp;#039;&amp;#039;&amp;#039;Min LOD&amp;#039;&amp;#039;&amp;#039; The minimum LOD clamp, scaled by 8. Usually 0 so the 0th Mipmap level is used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || Byte || &amp;#039;&amp;#039;&amp;#039;Max LOD&amp;#039;&amp;#039;&amp;#039; The maximum LOD clamp, scaled by 8. This should practically have the same value as MipmapCount.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Byte || &amp;#039;&amp;#039;&amp;#039;Total number of images&amp;#039;&amp;#039;&amp;#039;, thus number of mipmaps + 1. Apparently unread by the engine itself, it only uses the MipmapEnable flag and the max LOD field.&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || Byte || style=background:lightgray | &amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039; Probably Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || UInt16 || &amp;#039;&amp;#039;&amp;#039;LOD Bias&amp;#039;&amp;#039;&amp;#039; The LOD bias of the texture, scaled by 100.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Offset to image data&amp;#039;&amp;#039;&amp;#039;, relative to the start of the file header&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || colspan=2 style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | End of file header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Palette Data ==&lt;br /&gt;
{| class=&amp;quot;textbox grid alt center&amp;quot; style=&amp;quot;border:1px; solid:#0000a0; max-width:743px;&amp;quot; rules=all&lt;br /&gt;
|-&lt;br /&gt;
! colspan=7 style=&amp;quot;background:#000080; color:white;&amp;quot; | Image Formats (&amp;#039;&amp;#039;Table inspired off of [http://wiki.tockdom.com/wiki/Template:Image_Formats this])&lt;br /&gt;
|- style=&amp;quot;background:#b0b0f0&amp;quot;&lt;br /&gt;
! ID !! Name !! Bits per pixel !! Block width !! Block height !! Block size !! Type&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x00 || I4 || 4 || 8 || 8 || 32 bytes || Gray&lt;br /&gt;
|- style=&amp;quot;background:#f0f0ff&amp;quot;&lt;br /&gt;
| 0x01 || I8 || 8 || 8 || 4 || 32 bytes || Gray&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x02 || IA4 || 8 || 8 || 4 || 32 bytes || Gray + Alpha&lt;br /&gt;
|- style=&amp;quot;background:#f0f0ff&amp;quot;&lt;br /&gt;
| 0x03 || IA8 || 16 || 4 || 4 || 32 bytes || Gray + Alpha&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x04 || RGB565|| 16 || 4 || 4 || 32 bytes || Color&lt;br /&gt;
|- style=&amp;quot;background:#f0f0ff&amp;quot;&lt;br /&gt;
| 0x05 || RGB5A3 || 16 || 4 || 4 || 32 bytes || Color + Alpha&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x06 || RGBA32|| 32 || 4 || 4 || 64 bytes || Color + Alpha&lt;br /&gt;
|- style=&amp;quot;background:#f0f0ff&amp;quot;&lt;br /&gt;
| 0x08 || C4 || 4 || 8 || 8 || 32 bytes || Palette (IA8, RGB565, RGB5A3)&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x09 || C8|| 8 || 8 || 4 || 32 bytes || Palette (IA8, RGB565, RGB5A3)&lt;br /&gt;
|- style=&amp;quot;background:#f0f0ff&amp;quot;&lt;br /&gt;
| 0x0A || C14X2 || 16 || 4 || 4 || 32 bytes || Palette (IA8, RGB565, RGB5A3)&lt;br /&gt;
|- style=&amp;quot;background:#d0d0f0&amp;quot;&lt;br /&gt;
| 0x0E || CMPR || 4 || 8 || 8 || 32 bytes || Color + 1 bit Alpha (compressed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
[http://avsys.xyz/upload/files/Wexos%27s%20Toolbox%20v1.0.2.0.zip Wexos&amp;#039;s Toolbox] can convert PNG files into BTI images. (Only supports certain pallets.)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://szs.wiimm.de/ Wiimms SZS Tools] can convert BTI and PNG images in any direction. It may also convert the image and palette formats and add or remove mipmaps on the fly.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/KillzXGaming/Switch-Toolbox Switch Toolbox] can open BTI images and convert them into PNG files.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/Lord-Giganticus/BTIConv BTIConv] is a cross platform solution to convert BTI and PNG images in any direction. Built in NET 6.0&lt;br /&gt;
== Libraries ==&lt;br /&gt;
[https://github.com/SuperHackio/Hack.io/tree/master/Hack.io.BTI Hack.io.BTI] Windows only C# library to help manipulating BTI images&lt;/div&gt;</summary>
		<author><name>Lord-Giganticus</name></author>
	</entry>
</feed>