I've made a fork of Lameguy's img2tim tool that adds detection and conversion of 8-bit images into 4-bit if the palette only contains 16 colors or less.
Has all the same functions as the original, it is based on v0.75.
Github:
https://github.com/ArthCarvalho/img2tim
Download link:
https://github.com/ArthCarvalho/img2tim ... _.v0.8.zip
IMG2TIM-EX - Fork of Lameguy's img2tim with new functions.
- ArthCarvalho
- Active PSXDEV User
- Posts: 45
- Joined: Jan 29, 2016
- I am a: Artist, Programmer
- PlayStation Model: SCPH-103
- ArthCarvalho
- Active PSXDEV User
- Posts: 45
- Joined: Jan 29, 2016
- I am a: Artist, Programmer
- PlayStation Model: SCPH-103
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
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
Nice to have a command line tool, thank you for forking this!
Edit: Figured out my issue! Img2Tim-EX requires an indexed 8-bit image in order to automatically detect if it is using 16 colors or less. My image technically used less than 16 colors, but was saved as a 24-bit image.
Original post below -
Edit: Figured out my issue! Img2Tim-EX requires an indexed 8-bit image in order to automatically detect if it is using 16 colors or less. My image technically used less than 16 colors, but was saved as a 24-bit image.
Original post below -
I'm running into a small issue: I'm trying to use this tool in tandem with Orion's PocketStation Devkit, but "tim2mcicon" returns this error:I've tried using "-bpp 4" when converting my image to TIM just in case, but it doesn't seem to do the trick.Bad TIM file format, must be 4 bits CLUT
It's worth noting that Img2Tim-ex is producing a valid TIM — I'm able to make the result conform to a 4-bit CLUT by opening and editing the palette with Tim2View, so I have a workaround. It'd just be nice to be able to totally automate the conversion step.
-
- What is PSXDEV?
- Posts: 1
- Joined: Sep 27, 2024
- Location: United states
I was having some issues with the command line and am completely stuck. I was trying to convert a png to tim, but wanted to mark the bpp as 16 instead and don't know how to post the command line
-
- What is PSXDEV?
- Posts: 1
- Joined: Mar 10, 2025
- PlayStation Model: SCPH-1002
- Discord: 10001
- Location: America
Have you fixed it yet, can you appeal to me?Solidsnake777 wrote: ↑September 27th, 2024, 4:31 am I was having some issues with the command line and am completely stuck. I was trying to convert a png to tim, but wanted to mark the bpp as 16 instead and don't know how to post the command line
Who is online
Users browsing this forum: No registered users and 13 guests