TexturePacker: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Martijn
(Created page with "{{DevsHeader|'''XBMC Skin development'''}} [http://forum.xbmc.org/showthread.php?tid=92965 How do I build a xbt file with texturepacker?] https://github.com/xbmc/xbmc/tree/mas...")
 
>Ronie
No edit summary
Line 1: Line 1:
{{DevsHeader|'''XBMC Skin development'''}}
{{DevsHeader|'''XBMC Skin development'''}}


==TexturePacker Explained==
XBMC uses a tool named TexturePacker to compile all images used in a skin into a single file.
The benefit of it is that images inside the Textures.xbt will load faster in the skin.
This is done by converting all images into a format that take less processing by XBMC
when they need to be rendered onto the screen.


[http://forum.xbmc.org/showthread.php?tid=92965 How do I build a xbt file with texturepacker?]
A common misconception is that TexturPacker will just compress the images into a single file,
this if far from the truth, so don't be surprised if the Textures.xbt file is much larger
than to total size of all the individual images.


https://github.com/xbmc/xbmc/tree/master/tools/TexturePacker
==How To Get It==
If you are using Windows, you can simply download an up-to-date version of TexturePacker from the XBMC GIT repo.
it is available here: [https://github.com/xbmc/xbmc/blob/master/tools/TexturePacker/TexturePacker.exe?raw=true TexturePacker.exe]


On other platforms, you will have to compile TexturePacker yourself.
This is done by compiling XBMC and when the compile is finished, you can find TexturePacker
inside the ../tools/TexturePacker directory.


==Usage==
Since TexturePacker is a command-line tool, you will need to open a dos box/terminal/console in order to run it. The general usage is:
<pre>TexturePacker -input skin.name\media -output skin.name\media\Textures.xbt</pre>
Optionally, you can run TexturePacker with the ''-dupecheck'' option. This is useful if you have included the same image multiple times in your media folder.
For example, if your skin includes a lot of studio logos, most likely a lot of them are included multiple times but with a slightly different filename.
The '-dupecheck' option will make sure each unique image is included only once in the Textures.xbt file and thus keeping the size of it as small as possible.
If your skins includes [http://wiki.xbmc.org/index.php?title=Skinning#Skin_Themes themes] you should also run TexturePacker on your theme folders:
<pre>TexturePacker -input skin.name\themes\Blue -output skin.name\media\Blue.xbt</pre>


==See also==
==See also==

Revision as of 21:24, 6 February 2013

Template:DevsHeader

TexturePacker Explained

XBMC uses a tool named TexturePacker to compile all images used in a skin into a single file. The benefit of it is that images inside the Textures.xbt will load faster in the skin. This is done by converting all images into a format that take less processing by XBMC when they need to be rendered onto the screen.

A common misconception is that TexturPacker will just compress the images into a single file, this if far from the truth, so don't be surprised if the Textures.xbt file is much larger than to total size of all the individual images.

How To Get It

If you are using Windows, you can simply download an up-to-date version of TexturePacker from the XBMC GIT repo. it is available here: TexturePacker.exe

On other platforms, you will have to compile TexturePacker yourself. This is done by compiling XBMC and when the compile is finished, you can find TexturePacker inside the ../tools/TexturePacker directory.

Usage

Since TexturePacker is a command-line tool, you will need to open a dos box/terminal/console in order to run it. The general usage is:

TexturePacker -input skin.name\media -output skin.name\media\Textures.xbt

Optionally, you can run TexturePacker with the -dupecheck option. This is useful if you have included the same image multiple times in your media folder. For example, if your skin includes a lot of studio logos, most likely a lot of them are included multiple times but with a slightly different filename. The '-dupecheck' option will make sure each unique image is included only once in the Textures.xbt file and thus keeping the size of it as small as possible.

If your skins includes themes you should also run TexturePacker on your theme folders:

TexturePacker -input skin.name\themes\Blue -output skin.name\media\Blue.xbt

See also

Development: