New release. Now with added support for setting arbitrary color indices as semi-transparent.
Use -sindex to set the semi-transparent bit to a specific color index, note that it`s 0-based index so the first color is 0, the second color is 1 and so on.
You can also use -srange to set a range of colors to semi-transparent.
Now if you're asking, what exactly can you do with the semi-transparent bit? Well, that's simple:
If you set your sprite/polygon with semi-transparency, it will only apply the semi-transparent effect on colors that have this bit set.
There are 3 kinds of "transparency" a texture/sprite can have on the PlayStation: Completely transparent (Black, RGB 0,0,0), Completely opaque (Any other colors with semi-transparent bit set to 0) and semi-transparent, which are colors with the st bit set to 1.
Note that no transparency effect will work on colors that have the transparent bit set to 0, so if you want to fade out your image or use additive/subtractive blending modes, you must set the transparent bit to all colors that are not black/transparent.
If you want to fade out a sprite or texture while using this "mixed" semi-transparent bit mode, you need to prepare two CLUTs in advance where one has only some colors with the semi-transparent bit, and when "fading" you switch to a CLUT with all colors set to semi-transparent.
Download link:
https://github.com/ArthCarvalho/img2tim ... _.v0.9.zip