Page MenuHomePhabricator

Over-sharpening of professional/high-res JPEG images uploaded to Wikimedia Commons
Open, Needs TriagePublic

Description

Summary: Professionally shot JPEG images uploaded to the Commons are over-sharpened in both thumbnail and all resized versions, often creating a horribly over-processed image when no additional work was needed.

This is an issue affecting select images, typically those taken by professional photographers (that Wikimedia sorely needs more of), that are pin-sharp, perfectly-focused and with strong depth of field. Such photographers are liable to already upload their images perfectly, so additional processing - especially so severe - is frustrating.

ImageMagick, to my understanding, sharpens images when generating thumbnails and is the cause of this issue. It does not do this to PNG images, and as such a workaround has been to use PNG, which is recommended in the documentation for print quality photographs regardless. However, not all are keen on use of PNG, so a solution would be preferred.

This is a particular issue as it affects the best photographs, and may put off professional photographers from contributing. Wikimedia UK has recently campaigned for those capable of professional images to get involved, and such barriers are unfortunate.

Possible solutions include:

  • Introducing options for advanced users that allow them to stipulate no-sharpening (and perhaps also a low-sharpening option), maybe restricted to those activating it in settings to avoid misuse. CMS such as WordPress support such parameters and it would most likely involve informing ImageMagick of the way to handle the specific image on upload. This is the option I prefer.
  • Looking at changing the sharpening algorithm to reduce the amount. This is my lesser preferred option as some images do not need any additional work, often the very best on the Commons, and the default sharpening does help blurry bridge camera and mobile phone photographs.

Event Timeline

KaisaL created this task.Jun 27 2016, 10:13 PM
Restricted Application added subscribers: Zppix, Poyekhali, Steinsplitter, Aklapper. · View Herald TranscriptJun 27 2016, 10:13 PM

As I understand it, all JPEGs are sharpened the same amount, and all PNGs not at all. My experience with older photos (with film grain and such) and engravings is that some sharpening is needed, though I suspect a bit less could work in most cases. But we need this feature.

As I understand it, all JPEGs are sharpened the same amount, and all PNGs not at all. My experience with older photos (with film grain and such) and engravings is that some sharpening is needed, though I suspect a bit less could work in most cases. But we need this feature.

This is why I favour the first solution, of having a number of options for advanced users. A lower level of sharpening would suit your needs, and no sharpening would suit mine. Changing the defaults would, as I have aforementioned, have implications for images that currently suit the current algorithm - which seems to be most amateur photographs. Given that ImageMagick's algorithm operates on a number that denotes the sharpening level, having the ability to change this number for an upload would be ideal and seem the best to appease all parties.

As I understand it, all JPEGs are sharpened the same amount, and all PNGs not at all. My experience with older photos (with film grain and such) and engravings is that some sharpening is needed, though I suspect a bit less could work in most cases. But we need this feature.

Technically, its only applied to JPEGs that are shrunk by more than 85% (In practise, that's basically all JPEGs)

Looking at changing the sharpening algorithm to reduce the amount. This is my lesser preferred option as some images do not need any additional work, often the very best on the Commons, and the default sharpening does help blurry bridge camera and mobile phone photographs.

Sharpening is also meant to counteract the increase in blurriness from the filter algorithm we currently use. (Some people have suggested changing to Mitchell, but that never went anywhere, I think due to unclear performance concerns)


I am 99% sure there is already a bug for this, but I can't find it. Its related to the feature request of being able to specify what page of a PDF to display by default, but I also can't find that :(

Technically, its only applied to JPEGs that are shrunk by more than 85% (In practise, that's basically all JPEGs)
I am 99% sure there is already a bug for this, but I can't find it. Its related to the feature request of being able to specify what page of a PDF to display by default, but I also can't find that :(

We (myself and a couple of other users) did look for another bug report on this, but we couldn't find anything on this issue. It looks like this is the first time that it's come up some thoroughly, possibly because new contributors have raised concerns with it.

I feel that changing algorithms nor the 85% threshold would be an ideal option, even if it's probably easier to try, because changing for one type of uploader is bound to have a detrimental impact on others. The ability to change it with variable sharpening seems the only way to suit all causes. (And I think a very key point is that the most expert photographers - those we're so keen to attract - know best about their photographs, and it would be good to give them the ability to present their photographs as intended.)

Jeff_G added a subscriber: Jeff_G.Apr 22 2018, 8:10 PM

@KaisaL The thumbnail rendering system used on Wikimedia wikis has been replaced since you filed this task, so I wanted to check that this is still an issue.

The current conditional sharpening filter is an ImageMagick unsharp mask with

radius = 0.0
sigma = 0.8
amount = 1.0
threshold = 0.0

that applies to JPGs shrunk by more than 85%.