Last modified: 2011-07-17 05:17:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2229 - Transparant GIF's lose transparancy when resized
Transparant GIF's lose transparancy when resized
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
PC Linux
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
Depends on:
Blocks: gif
  Show dependency treegraph
Reported: 2005-05-23 08:14 UTC by Jeroen Roos
Modified: 2011-07-17 05:17 UTC (History)
3 users (show)

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

A GIF picture with transparancy (734 bytes, image/gif)
2005-05-23 17:33 UTC, Jeroen Roos
Same GIF image, after being "resized" to 64px (578 bytes, image/gif)
2005-05-23 17:37 UTC, Jeroen Roos
Resized with ImageMagick to 40px (1.02 KB, image/gif)
2005-06-14 17:47 UTC, Jeroen Roos

Description Jeroen Roos 2005-05-23 08:14:07 UTC
During the resizing of GIF's with a transparant colour, the transparancy is lost.
Comment 1 Brion Vibber 2005-05-23 08:20:13 UTC
Your server or our server? (URL?)
Using ImageMagick or GD?
What version of ImageMagick or GD?
Can you provide an example image?
Comment 2 Jeroen Roos 2005-05-23 17:32:32 UTC
> Your server or our server? (URL?)
Mine, I am running mine in log on only mode, so I can't give you access

> Using ImageMagick or GD?
Both GD and Imagemagick are installed on my system, my LocalSettings.php says:

$wgUseImageResize               = true;
# $wgUseImageMagick = true;
# $wgImageMagickConvertCommand = "/usr/bin/convert";

> What version of ImageMagick or GD?
gd 2.0.32

> Can you provide an example image?
Sure, see attachment.

Comment 3 Jeroen Roos 2005-05-23 17:33:26 UTC
Created attachment 565 [details]
A GIF picture with transparancy
Comment 4 Jeroen Roos 2005-05-23 17:37:14 UTC
Created attachment 566 [details]
Same GIF image, after being "resized" to 64px

The files size is actually the same as the original (64x64px), but the same
occurs with the 32x32px version.
Comment 5 Brion Vibber 2005-05-23 20:44:38 UTC
You're using GD, which is notoriously unreliable. Try uncommenting the ImageMagick 
lines, and confirm the path to the executable.
Comment 6 Jeroen Roos 2005-06-14 17:47:48 UTC
Created attachment 610 [details]
Resized with ImageMagick to 40px
Comment 7 Jeroen Roos 2005-06-14 17:50:25 UTC
I have changed LocalSettings.php to:
## To enable image uploads, make sure the 'images' directory
## is writable, then uncomment this:
$wgDisableUploads               = false;
$wgUseImageResize               = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

# which convert

So I suppose I use ImageMagick now. The result is now slightly better, but still
not as it should be.

BTW, I am running 1.4.5 now.
Comment 8 Xudong Yang 2008-10-01 12:54:45 UTC
I have a similar problem on my wiki. When a .gif image is resized, the black parts of it are converted into a transparent background, so the resized image looks pretty bad against a white/light background.

Take the image for example: the original gif file is at and the resized gif at . The latter looks pretty bad because of the black background replaced by a transparent (white) background.

I'm running MW 1.13.0, using GD.
Comment 9 Dan Collins 2011-07-17 05:17:34 UTC
Please test with current imagemagick and mediawiki, and include version numbers of both and sample output.

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