Last modified: 2011-07-17 05:17:34 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 T4229, the corresponding Phabricator task for complete and up-to-date bug report information.
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)
1.13.x
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: ---


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

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?
imagemagick 6.2.2.3
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
/usr/bin/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 http://www.dota-allstars.com/wiki/Image:BTNRevenant.gif for example: the original gif file is at http://www.dota-allstars.com/w/images/BTNRevenant.gif and the resized gif at http://www.dota-allstars.com/w/images/thumb/BTNRevenant.gif/48px-BTNRevenant.gif . 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.


Navigation
Links