16-bit per pixel TIM image is seen as 8-bit per pixel

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
aybe
Posts: 5
Joined: Mon Feb 14, 2022 5:39 am

16-bit per pixel TIM image is seen as 8-bit per pixel

Post by aybe »

XnView MP 0.99.7 64-bit
Windows 10.0.19044.1526

Incorrect bit-depth reported by XnView MP for TIM files.

To reproduce:
1. unzip the attachment as TIM file couldn't be attached as such
2. browse to where the file is with XnView MP
3. see that bit-depth is 8 while it should be 16

Expected behaviour:
TIM files with a bit-depth of 16 should not be reported as with a bit-depth of 8.

Thank you :P
Attachments
xnviewmp_C0DZSzHEgo.png
xnviewmp_C0DZSzHEgo.png (140.12 KiB) Viewed 419 times
ANALOG1.zip
(37.76 KiB) Downloaded 14 times
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 16-bit per pixel TIM image is seen as 8-bit per pixel

Post by xnview »

RGB is packed as 16bits, but not 16bits per component
Pierre.
aybe
Posts: 5
Joined: Mon Feb 14, 2022 5:39 am

Re: 16-bit per pixel TIM image is seen as 8-bit per pixel

Post by aybe »

Don't you think there's some discrepancy in the following?
xnviewmp_5AobI58dZP.png
I mean, if I follow you, then all should be 8 but currently 4bpp reports 4, 8bpp reports, 24bpp reports 24 but 16bpp reports 8 which makes no sense.

Or did I simply miss something in what you've said? :D
Attachments
tims.zip
(13.68 KiB) Downloaded 12 times
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 16-bit per pixel TIM image is seen as 8-bit per pixel

Post by xnview »

aybe wrote: Tue Feb 15, 2022 8:21 am Don't you think there's some discrepancy in the following?
Yes, the first one should be reported as 192x144x24 and not 8
Pierre.
aybe
Posts: 5
Joined: Mon Feb 14, 2022 5:39 am

Re: 16-bit per pixel TIM image is seen as 8-bit per pixel

Post by aybe »

Actually, a 16-bit TIM may either:

#1 remain 16-bit if any of its pixel does not have the STP bit set.

#2 become 32-bit if any of its pixel has the STP bit set, this is because it actually is, semi-transparency, if it wasn't then it could simply be a 15-bit + 1 bit of transparency like TGA format supports.

As for the semi-transparency algorithm, it's a bit contradictory in the PDFs you can find at psxdev.net, the file format specifies one way in table 3-1 at page 182, while the runtime library overview in table 8-11 at page 107 specifies the same but for one case.

Now that really is the cake topping, I understand that there may be higher priority bugs to solve than this one within XnView MP. :D
Post Reply