Page MenuHomePhabricator

Content of some TIFF files blend together in file history
Closed, DuplicatePublic


I've gathered a few TIFF files at that look good in the thumbnail but when you scroll down to the file history section the content of the file is all moshed together. I don't know what is causing this but I figured I should report it.

Event Timeline

Jonteemil renamed this task from TIFF files get må to Content of some TIFF files blend together in file history.Jun 3 2021, 11:38 PM
Jonteemil added a project: Thumbor.
Jonteemil updated the task description. (Show Details)
Jonteemil updated the task description. (Show Details)

I purged the first two files useing ?action=purge, and they rendered quite differently (one imho worse, one imho better, but mostly different), and in both of them even the full-size-preview was imho before purging was awefull (not as described in the bug-descripiton).

I overwrited the first tiff-file using gimp, which solved the issue, however for the first two files (did not try the others) gimp reported:

Screenshot from 2021-06-04 09-32-46.png (211×488 px, 14 KB)

So I assume it is a file-issue, and another strange thing is was 2,7MB large, and resaving the tiff uncompressed was only 475KB, (The bitmap (*.bmp) is uncompressed 426kB, and the PNG can be lossless compressed with pngout to 9,6kB.) So the 2,7MB looks strange to me (maybe hidden data?).

Since gimp renders it correct I assume it is related to a wrong/different error-handling.

I consider the reported jpg in as correct.

@JoKalliauer Thanks for looking into this. looks good now but I think you accidently changed the metadata 'image title' to the URL of this Phabricator task :).

Regarding, on my computer it looks the same in the thumbnail as in the file history section. You see the gray lines behind the text. However when you click on it and get to the lines have disappeared. It is this lineless image that is in the thumbnail on my phone where in the file history the lines appear again. So there must be some rendering issue going on there as well.

I agree that perhaps good in the thumbnail was an exaggeration, (and a few more) doesn't look good, but at least better compared to the version showed in the file history section. Regarding the more technical stuff you mentioned, whether the issue lies with the individual file or with the Mediawiki software, whether there was hidden data that made the file so large etc. I won't really be the best sounding board to you b/c of my limited knowledge of what goes on beyond the computer screen :).

@Jonteemil : Regardin JPEG-Preview of the *jpg: I just compared full-size-preview with 120px-preview (not the raw file), thanks that is strange and might be a different issue.

@Aklapper : Do you know why *.tiff are previewed as *.jpg not as *.png. *.tiff s are imho often scans so jpg might make sense. But imho most *.tiff (but imho not all?) are uncompressed or lossless compressed (e.g. ZIP, LZW), so maybe a converting to png would make more sence?

It looks to me like this is a CMYK problem. When you passed File:Sc cmyk pos claim.tif through Gimp, you exported it as RGB. Filesize savings aren't unexpected converting from unoptomized CMYK[A] to sRGB[A] with a colormap.

Testing locally, it appears that this is just T272364: Overly blurry JPG thumbnail for certain JPG and TIFF images due to chroma-subsampling not working in CMYK. TIFFs don't get conditional sharpening, even when thumbnailing to jpg, but they do get the same sampling factor.

With sampling-factor:

120px-20210604073534!Sc_cmyk_pos_claim.tif-0.jpg (33×120 px, 597 KB)

Without sampling-factor:
120px-nc-20210604073534!Sc_cmyk_pos_claim.tif-0.jpg (33×120 px, 598 KB) was mostly fixed with a purge, but is still affected by T272364.

As far as jpg vs png, that's a PagedTiffHandler decision, see Thumbor is capable of outputting either (or a lossy or lossless webp), and you can choose lossy or lossless anywhere but the file page. I'm guessing the choice of lossy-by-default was just due to filesize considerations.

@AntiCompositeNumber Okay, thanks for your digging!
(I hope this doesn't reopen the task...)