Multi Commander > Support and Feedback

Bug in image viewer

<< < (2/2)

nietrupek:

--- Quote from: Mathias (Author) on October 02, 2026, 07:04:43 ---[IFD1 (thumbnail)] at offset 64, 3 entries
  0x0103 Compression                  LONG      count=1     inline   (6,) <-- WRONG TYPE, expected SHORT
  0x0201 JPEGInterchangeFormat        LONG      count=1     inline   (106,)
  0x0202 JPEGInterchangeFormatLength  LONG      count=1     inline   (1891,)

--- End quote ---

All clear now. I simply misunderstood your previous post. I was looking for KEY 0x0103 as LONG while you meant its VALUE (6). So, your AI was right. Here they are:

00000a0  00  03  01  04  00  01  00  00  00  06  00  00  00  01  02  04
00000b0  00  01  00  00  00  6a  00  00  00  02  02  04  00  01  00  00


If someone is interested how to repair such files: as JPEG compression is lossy, we must re-write matadata only while leaving image data intact.

This command reads metadata and writes them back:
c:> exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile  plomyki.jpg

The result is attached. Viewer shows it properly.

Thank you for your support. I definitely learned something new.

Mathias (Author):
Microsoft reader is a bit to strict. yes reading a value that is expected as SHORT as LONG can be a problem. But only if the value read actual is larger then MAX SHORT value. and this value can only be 0-6
But I guess Microsoft just follow the spec very strict.

However for the next version.. If it fails to loading an image because of metadata.. It will retry loading it without metadata.

nietrupek:

--- Quote from: Mathias (Author) on October 03, 2026, 11:36:26 ---Microsoft reader is a bit to strict. yes reading a value that is expected as SHORT as LONG can be a problem. But only if the value read actual is larger then MAX SHORT value. and this value can only be 0-6

--- End quote ---

No, value can be even MAX_SHORT - 1. This is the best and most detailed documentation I am aware of:
https://exiftool.sourceforge.net/TagNames/EXIF.html#Compression
It was created in 2005 and is refined and updated for 21 years.


--- Quote from: Mathias (Author) on October 03, 2026, 11:36:26 ---But I guess Microsoft just follow the spec very strict.

However for the next version.. If it fails to loading an image because of metadata.. It will retry loading it without metadata.

--- End quote ---

Kudos to Microsoft. They SHOULD be strict. Years ago they added their own "enhancenents" everywhere, making a mess in programming world. Glad they stopped.

If you accept the suggestion: please show at least warning informing user that his file is problematic. If not, even a red dot in menu area would be better than nothing.

nietrupek:
Is there any restriction on image dimension in  WIC? I have some very tall images and all but one are displayed by image viewer:
610x10789 - OK
540x16635 - fails

I don't think it is metada problem because rewriting file using my favourite tool (exiftool) doesn't help.
WebView displays image correctly.

Mathias (Author):
I don't this so as long as it fits into memory.

Navigation

[0] Message Index

[*] Previous page

Go to full version