Forums / Maintenance / Report Problems

27,924 total conversations in 1,746 threads

+ New Thread


KYM downgrades GIFs on upload, increases filesize while doing it

Last posted Jul 15, 2015 at 07:14PM EDT. Added Jul 08, 2015 at 07:04AM EDT
5 posts from 2 users

What subject says:
When you upload a GIF animation to the site, the site downgrades it's quality to show it in a preview. I can understand that in regular circumstances, but it looks like KYM's downgrading system is botched, when it comes down to GIFs – while reducing quality of the GIF, it also increases the filesize quite substantially.

Original images still can be accessed by clicking the preview, but the thing is that preview is loaded first, and it's both bigger in size and worse in quality.

This seems really counterproductive, and touches several of my sensitive spots as a quality-fag that I am.

Here's some examples:
https://knowyourmeme.com/photos/974419-doom
Original file – 4 Mb, KYM preview – 7 Mb

https://knowyourmeme.com/photos/988853-anime
Original file – 2 Mb, KYM preview – 5,7 Mb

https://knowyourmeme.com/photos/989040-monster-musume-daily-life-with-monster-girl
Original file – 1,1 Mb, KYM preview – 3,47 Mb

https://knowyourmeme.com/photos/987729-anime
Original file – 1,14 Mb, KYM preview – 2,62 Mb

https://knowyourmeme.com/photos/988782-monster-musume-daily-life-with-monster-girl
Original file – 0,8 Mb, KYM preview – 1,7 Mb

Image dimensions and other properties are the same for both preview and original, so it can't be result of resampling.

What I noticed: if an image uses some optimisation techniques like separate palettes for each frame, KYM downgrades it heavily, no matter the outcome.

The solution for this issue should be relatively simple – make whatever algorithm KYM uses to generate previews to also check whether or not preview file would be bigger than original, and if it is, discard the preview and use original image for preview instead – this will result in both saved space and better quality animations on the site.

Whoah, it's rather impressive that you noticed something like this. In response to your rejected image, though, I'll note that it's above 6 million bytes. When Know Your Meme says "6 MB", maybe it means an SI megabyte rather than an IEC megabyte.

You're absolutely right about gallery image file sizes. I did a search for GIF files and tested the first few I came across; here's what I got.

https://i.kym-cdn.com/photos/images/original/000/000/100/chocolate-rain-lazzzzor.gif
masonry: 476K newsfeed: 770K original: 708K

https://i.kym-cdn.com/photos/images/original/000/100/001/foda2.gif
masonry: 658K newsfeed: 22K original: 19K

https://i.kym-cdn.com/photos/images/original/000/100/002/8df.gif
masonry: 15K newsfeed: 59K original: 59K

https://i.kym-cdn.com/photos/images/original/000/100/004/sou-foda.gif
masonry: 483K newsfeed: 686K original: 616K

https://i.kym-cdn.com/photos/images/original/000/100/128/happycat.gif
masonry: 40K newsfeed: 71K original: 71K

https://i.kym-cdn.com/photos/images/original/000/100/159/lolno.gif
masonry: 47K newsfeed: 67K original: 67K

https://i.kym-cdn.com/photos/images/original/000/100/187/amidoinitrite.gif
masonry: 21K newsfeed: 112K original: 112K

https://i.kym-cdn.com/photos/images/original/000/100/201/Yoko_Kamina_Caramelldansen_by_BirchillProductions.gif
masonry: 144K newsfeed: 225K original: 219K

https://i.kym-cdn.com/photos/images/original/000/100/273/pvp20071101.gif
masonry: 8.1K newsfeed: 53K original: 62K

https://i.kym-cdn.com/photos/images/original/000/100/286/THE_MOON_IS_COMING_by_beriiblizzard.gif
masonry: 339K newsfeed: 59K original: 62K

https://i.kym-cdn.com/photos/images/original/000/100/312/bwUar2.gif
masonry: 980K newsfeed: 1.6M original: 1.7M

https://i.kym-cdn.com/photos/images/original/000/100/313/whatwhat.gif
masonry: 529K newsfeed: 529K original: 518K

https://i.kym-cdn.com/photos/images/original/000/100/314/ve6r79.jpg
masonry: 1.9M newsfeed: 3.2M original: 3.2M

https://i.kym-cdn.com/photos/images/original/000/100/315/iTAmc.GIF
masonry: 820K newsfeed: 3.8M original: 4.0M

https://i.kym-cdn.com/photos/images/original/000/100/316/311s40x.gif
masonry: 2.4M newsfeed: 3.8M original: 3.6M

https://i.kym-cdn.com/photos/images/original/000/100/377/G4YKJ.gif
masonry: 238K newsfeed: 754K original: 746K

https://i.kym-cdn.com/photos/images/original/000/010/039/Tails_doll_knife_spin_by_Sam64.gif
masonry: 58K newsfeed: 86K original: 86K

https://i.kym-cdn.com/photos/images/original/000/100/407/1270775737930.gif
masonry: 1.3M newsfeed: 496K original: 478K

https://i.kym-cdn.com/photos/images/original/000/100/441/hitler120110725-22047-1l5d7c6.gif
masonry: 125K newsfeed: 3.8K original: 3.8K

GIMP tells me that the "newsfeed" images use RGB colour and I noticed that many of those images' combined frames have less transparent space then the same frames in the orignals. I won't say that these explain the image size differences, but they could be a clue.

Sinael, I'm curious: what made you look for this discrepancy in the first place?

Last edited Jul 09, 2015 at 01:48PM EDT

The gif I posted in the second post actually got uploaded, but it still showed up "Not uploaded due to filesize" red message when uploading. Maybe it has something to do with the fact that I tried to upload bigger versions (with more frames and colors) prior to that. I don't know which of my tries got through because there were many.

What made me look into this:
I have a pretty keen eye for visual artifacts, distortions and all that stuff, due to a lot of experience in working with imagery, monitors and visuals. So I am more likely to notice if something looks off than AverageJoe (If there's a user with that name, sorry in advance).
Because of all above I am sometimes (most of the times) meticulous about my works and the stuff I upload. I put quite some effort in optimisations of quality and such (look at originals of my gifs to see what I mean).

I have noticed quality reduction before, but always attributed it to preview downgrading and thought it was actually saving some space, but when I saw artifacts on an image, I knew for a fact could not contain them:

In the original, the pixel shimmering seen on the edges of two green parts of backgrounds is just not there.

This made me look into the differences between the files, and filesize was the first thing I noticed, obviously.

After looking closer I found out that KYM preview algorithm unoptimises the files, for some ungodly reason, then applies an inferior optimisation of it's own, that mostly consists of reducing palettes and reframing active parts of the frames, which of course does not work at all if the active part of a frame is whole goddamn frame – in which case it's left unoptimised even if it was optimised originally.

Thing is it also uses a faulty algorithm for unoptimising itself which degrades the quality of resulting previews even further.

Here are example frames from Suu animation:

Mine:


KYM


As you can see all KYM did was unoptimise an image (and adding artifacts that weren't there)

Here's another example, this time for reframing (image https://knowyourmeme.com/photos/974419-doom)

Mine:


KYM


Totally explanes a huge dip in quality and filesize increase.
KYM needs to step up their optimisation game. Or just implement a check I mentioned in the OP.

I think I got the idea why KYM reacts to some GIFs with error 504 (even when they fit it's criteria) – they are too big when uncompressed – this happens to a very well optimised GIFs that when unoptimised grow in size above certain limit – the GIF I tried to upload was 5,8 MB, and I already successfully uploaded a GIF of 5,9 MB before, but the thing is, that gif was very well optimised, and in unoptimised state it would occupy about 16 Mb, which is far above what KYM supposedly can handle.

Skeletor-sm

This thread is closed to new posts.

Old threads normally auto-close after 30 days of inactivity.

Why don't you start a new thread instead?

Sup! You must login or signup first!