Skip to content

nuogz/tex-2-image

Repository files navigation

@nuogz/tex-2-image

Version License

Currently it's just a simple early version that works in certain cases, without more testing and package optimization
Covert .tex texture file to common image format.
Refactor form LeagueToolkit.

Usage

If used as a command line tool

node index.js convert ./a.tex ./a.png

If used as a javascript library:

import { covertTexToImage } from '@nuogz/tex-2-image';

await covertTexToImage('./a.tex', './a.png', { force: true });

Motivation

I am a League of Legends dataminer. Typically, I use the excellent Obsidian to extract many files. Most of these files can be used directly after extraction.
In recent updates, LOL has started to make more use of texture files in tex format. This also includes files that I periodically need to use. TEX is undoubtedly very good format for game loading, but common picture viewer does not support this format. I also couldn't find a command line tool to batch convert tex files.
Obsidian does support saving tex files as png files. So I read its source code, found out that it is a feature provided by LeagueToolkit.
LeagueToolkit is also excellent C# library. It's just that C# is not my usual language. Eventually I decided to refer to the part of LeagueToolkit that parses tex file and refactor it into a Node.js library, which is this one. To make it easier for me to continue developing tools and batch converting image formats.
Because of the above, I can't say for sure if this kind of tool supports tex format files from other games, or even if it supports any tex files extracted from LOL.
The use of this tool is very narrow at the moment.

About

Covert `.tex` texture file to common image format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published