Page MenuHomePhabricator

Thumbnailing produces much worse results for PNGs than JPG, but PNG is the only real option for serious restoration
Closed, ResolvedPublic

Description

Compare these two files. The originals are as near-identical as a JPG and PNG can be:

http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Tameing_a_Shrew%3B_or%2C_Petruchio%27s_Patent_Family_Bedstead%2C_Gags_%26_Thumscrews.png/251px-Tameing_a_Shrew%3B_or%2C_Petruchio%27s_Patent_Family_Bedstead%2C_Gags_%26_Thumscrews.png

http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Tameing_a_Shrew%3B_or%2C_Petruchio%27s_Patent_Family_Bedstead%2C_Gags_%26_Thumscrews.jpg/251px-Tameing_a_Shrew%3B_or%2C_Petruchio%27s_Patent_Family_Bedstead%2C_Gags_%26_Thumscrews.jpg

(Forgive the image itself - I discovered it with this image, meant to illustrate misogyny.)

As you can see, the PNG looks much, much blurrier.

However, PNG is also the only option for any serious restoration work. If we have to use JPG on Wikipedia anyway, then we're basically saying that a more-degraded file that cannot easily be edited is the only version that most people will know about.

This is a problem.


Version: unspecified
Severity: normal

Details

Reference
bz18014

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:34 PM
bzimport set Reference to bz18014.
bzimport added a subscriber: Unknown Object (MLST).

overlordq wrote:

Likely due to the JPGs being run through a sharpen introduced from bug 6193.

PNGs aren't run through sharpen regardless of rescaling. (Might be a reason behind that, I dont know off hand)

Throw in a sharpen on them too and you'll get similar outputs:

http://toolserver.org/~overlordq/images.html

Default png, Default (sharpened) jpg, Sharpened png.

Well, maybe we should apply the same to PNG thumbnails? If the two are treated identically, it'd at least avoid a situation where a less-appropriate format gets used because of thumbnailing alone. ~~~~

Is anyone actually going to apply simple sharpening to PNGs?

(In reply to comment #3)

Is anyone actually going to apply simple sharpening to PNGs?

No. Testing during initial deployment of the sharpening feature indicated that although it improves photos, it reduces the quality of diagrams and other images with large regions of solid colour. Since photos are usually uploaded as JPEG, and diagrams are not, we applied the sharpening only to JPEGs.

Can you please explain what is this "serious restoration" that you keep going on about and why it has any relevance to Wikipedia?

Is anyone doing anything about this?

(In reply to comment #5)

Is anyone doing anything about this?

You still haven't answered my prioritisation question. I need to know what priority to assign it if I'm going to work on it.

You're acting like this actually sends messages to me. If that's supposed to be the default, it's not working.

Put simply. Serious restoration is the restoring of high-resolution images of historical material. A display of such works, prepared for Wikipedia, is planned for the Tropenmusem in Amsterdam later this year, and is a big part of a major effort to get museums to open up their archives. The piss-poor handling of PNGs, and the complete lack of support for TIFFs is a huge hamper to such work.

Seriously, are you at all familiar with Wikimedia Commons?

(In reply to comment #8)

Seriously, are you at all familiar with Wikimedia Commons?

There's no need for that. I read most of the archives of Durova's blog a month or so ago. She managed to answer the question I was asking, and she did it without insults or abuse.

However, that research suggested to me some higher-priority development targets than optional sharpening, such as more efficient and less restricted scaling of very large TIFFs and PNGs, and an increase in the maximum file size limit.

The problem with optional sharpening, or indeed any feature that encourages photographic PNGs, is that readers will then be sent a PNG thumbnail. We really want to send them a JPEG unless they specifically ask for a lossless image. With the present feature set, it would be better for all concerned if you could take the time to upload a copy of the image in JPEG format, with a link to the PNG or TIFF in the other_versions parameter, and then encourage the use of the JPEG in articles.

mcdevitd wrote:

*** This bug has been marked as a duplicate of bug 45212 ***