Last modified: 2010-04-06 06:06:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15252, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13252 - Resizing of Some GIFs Rendering Poorly; Setting Needs Changing?
Resizing of Some GIFs Rendering Poorly; Setting Needs Changing?
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: gif
  Show dependency treegraph
 
Reported: 2008-03-04 22:11 UTC by Gabriel Weinberg
Modified: 2010-04-06 06:06 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Weinberg 2008-03-04 22:11:00 UTC
The resizing of images for thumbnails generally works great, but for some reason it does not for a small subset of images. This subset seems to be GIF images with large transparent backgrounds, e.g. logos. When they are being resized, some of the foreground is being dropped. This dropping does not occur if you resize in Photoshop. Could it be that a simple change in setting is needed?

Example: http://upload.wikimedia.org/wikipedia/en/thumb/8/8e/Techcrunch.gif/100px-Techcrunch.gif

It is not a deficiency of GIFs in this case. That is, it can be resized correctly. I did the following one in Photoshop (still transparent): http://en.wikipedia.org/wiki/Image:Techcrunch-transparent-photshop.gif

Reference discussion: http://en.wikipedia.org/wiki/Wikipedia_talk:Preparing_images_for_upload#Resizing_of_Some_GIFs_Rendering_Poorly.3B_Setting_Needs_Changing.3F

Please help!
Comment 1 Brion Vibber 2008-03-04 22:51:35 UTC
Presumably ImageMagick is being a little overzealous with the alpha channel...
Comment 2 Erwin Dokter 2008-11-27 15:24:39 UTC
From the server admin log:

November 6 
21:03 Tim: switched GIFs to use Bitmap_ClientOnly (client-side scaling) 
17:23 brion: restarting apache on srv47, seem smysteriously stuck 
17:15 brion: setting $wgMaxAnimatedGifArea to 1 to prevent animated thumbnailing of GIFs for now, see if that helps 
17:10 brion: river complaining of image scaler issues -- load spikes, depooling? 

This is bad news and there were no followups in the log. I really hope this will be fixed soon.
Comment 3 Andrew Garrett 2010-04-06 04:43:10 UTC
Resolved.
Comment 4 Tim Starling 2010-04-06 05:43:16 UTC
Did you resolve it properly, or in a way that will lead to downtime in the near future?
Comment 5 Andrew Garrett 2010-04-06 05:50:07 UTC
(In reply to comment #4)
> Did you resolve it properly, or in a way that will lead to downtime in the near
> future?

I resolved it by turning GIF scaling back on, and setting $wgMaxAnimatedGifArea to its original value.

This won't lead to downtime in the near future, because Bitmap.php uses getImageArea() to find the area to compare with $wgMaxImageArea. In GIF.php, getImageArea() now returns width * height * frame count. This should stop long or big GIFs from being thumbnailed.
Comment 6 Tim Starling 2010-04-06 05:54:27 UTC
You mean for GIFs uploaded after r54284 was deployed? What about GIFs uploaded before that time?
Comment 7 Andrew Garrett 2010-04-06 05:56:10 UTC
(In reply to comment #6)
> You mean for GIFs uploaded after r54284 was deployed? What about GIFs uploaded
> before that time?

I don't follow – are you saying that the metadata won't have been generated for GIFs uploaded before that time? That's a good point, I hadn't thought of that. I could probably fix it, though.
Comment 8 Tim Starling 2010-04-06 06:06:27 UTC
Yes that's what I was saying, but the facts appear to be even worse than that. None of the 30k GIF files in enwiki have valid metadata.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links