Topic: [Bug] Quality drop in Thumbnails

Posted under Site Bug Reports & Feature Requests

Bug overview description
Every time I upload a particularly mono-colored doodle,
the thumbnail of it would look extremely pixelated no matter
what I did to fix it.

Example: post #1304142

What part(s) of the site page(s) are affected?
The thumbnail created from the post.

What is the expected behavior?
A clear picture.

What actual behavior is given instead?
A heavily pixelated picture

Time of incident (if applicable).
Last night,
8/15/2017 1am Eastern time

Can you reproduce the bug every time?
Yes

What steps did you take to replicate this bug?
Reposing but scaled down.
My first thought was that it happened because of the picture
size so I tried scaling the picture down but the thumbnail
comes out exactly the same way.

Errors or other messages returned (if any).
None, Just the low-quality thumbnail.

Updated by user 22273

This is not a bug but design decision.

To keep page loading times and bandwidth usage low, thumbnails are always generated as 75 quality JPG. Because of JPG fileformat being designed for photographs, stuff like clear lines and solid colors compress insanely badly. This is also the reason why transparency turns into solid black as JPG does not support it. After all, thumbnails are supposed to be really small images which give you overall idea of what is the actual full size image.

I wouldn't mind if there was system in place that PNG posts had PNG thumbnails as with cases like this it would produce even lower filesize than JPG and only if specific filesize was exceeded would they be turned into similar JPG files. However not too sure that should effort be put into something like this. There has also been request to raise thumbnails resolution from 150 to 200 or above, but pretty sure that got shot down? Wouldn't be opposed to this as contents and monitors resolutions have been going up over time.

Updated by anonymous

thumbnails are in jpg and thats just what jpg does to images.

Updated by anonymous

i propose the thumbnails are made even worse quality to accommodate my third-world internet connection.

Updated by anonymous

fewrahuxo said:
i propose the thumbnails are made even worse quality to accommodate my third-world internet connection.

bad idea. this could easily make it even harder to figure out what is going on in image (and the purpose of thumbnails is to see preview of the image). like even 50 quality jpg is practically unviewable already. also this would worsen the quality of avatars too since they are thumbnails of the posts.

Updated by anonymous

Thumbnails are intentionally set to have quality level 75.
This is to reduce load on the server and client.
Quality 75 is commonly used by many services as it is a even balance between quality and file size.

Besides, no one really looks at the thumbnail other than to get a hint at what is really there(unless you are one of those weird users who uploads thumbnails).

Updated by anonymous

hmmm... i just thought of something. is it possible for transparent pics to be given a blank white background when uploaded?

as an example, certain transparent posts such as post #1259295 of the Swedish National Penis Inspection Day pool can be difficult to see properly at times. so a different background for such posts would be useful. i dunno if that's possible or not though.

currently, you have to click the download link for them to have the white background.

Updated by anonymous

treos said:
hmmm... i just thought of something. is it possible for transparent pics to be given a blank white background when uploaded?

as an example, certain transparent posts such as post #1259295 of the Swedish National Penis Inspection Day pool can be difficult to see properly at times. so a different background for such posts would be useful. i dunno if that's possible or not though.

currently, you have to click the download link for them to have the white background.

I asked about replacing black background with checkboard pattern which is usually indicating alpha channel in software, as this would indeed indicate image having alpha channel better on thumbnail, but apparently it's much harder than it sounds thanks to current system in place.

Gifs actually can have differend color on thumbnail if they use custom color profile.

Also opening image in new tab (e.g. clicking download) depents on browser how it's handled. Many modern browsers have started to center image and using checkboard in background as well.

Updated by anonymous

If course, making a pattern like that requires image editing, while this requires nothing.

Updated by anonymous

Mario69 said:
I asked about replacing black background with checkboard pattern which is usually indicating alpha channel in software, as this would indeed indicate image having alpha channel better on thumbnail, but apparently it's much harder than it sounds thanks to current system in place.

Gifs actually can have differend color on thumbnail if they use custom color profile.

Also opening image in new tab (e.g. clicking download) depents on browser how it's handled. Many modern browsers have started to center image and using checkboard in background as well.

huh...well, that sucks.

Updated by anonymous

Maybe once webp gets greater support we can use that for thumbnails.

The jpeg thumbnail for the specified post has a size of 4388 bytes, while this webp (which has alpha) has a size of 4332 bytes.

Current jpg thumbnail: https://static1.e621.net/data/preview/5e/67/5e67f71279b131054cda3cca2146f286.jpg
Webp thumbnail (only works in chrome currently): https://puu.sh/xbN6R/d20b9924f5.webp

Unfortunately all the other browser vendors are dragging their feet pretty hard when it comes to this subject. If you really care, make sure to leave a message or a vote indicating your support for this feature.

Updated by anonymous

Ledian said:
bad idea. this could easily make it even harder to figure out what is going on in image (and the purpose of thumbnails is to see preview of the image). like even 50 quality jpg is practically unviewable already. also this would worsen the quality of avatars too since they are thumbnails of the posts.

heck, ledian. i can tell it's a weird cat, jpeg artifacts and all. even posts coming in at level 30 compression wouldn't be that bad.

but if you don't want that, you could use some cheap optimization tricks, like the ones GIMP lets you export as, to reduce the size without sacrificing quality. if the server would run jpegoptim on their thumbnails, that would losslessly reduce the size as well.

asw_xxx said:
Maybe once webp gets greater support we can use that for thumbnails.

it's always a fight between "we can't use this feature because we don't have compatibility" and "we can't implement this feature because not enough people use it." not even the support of Google and its usage on Wikia is enough to faze browser vendors. i'm disappointed in Mozilla for having seven years to implement the thing, without even putting a test in the beta.

when YouTube switched to WebM, everyone else followed suit, though they aren't forcing WebP on anyone. maybe one day it'll creep up on us as more programs get support for it, and we start using it like we use jpeg now.

Updated by anonymous

  • 1