Page MenuHomePhabricator

some PNG thumbnails can be discolored
Closed, ResolvedPublic

Description

Author: tderouin

Description:
Certain, but not all PNG thumbnails can be discolored, as seen here.

This image:
http://wikidiy.com/mediawiki-1.9.1/index.php/Image:Looking_over_paper_657.png

is RGB, true color, 24 bits

This image:

http://wikidiy.com/mediawiki-1.9.1/index.php/Image:Red_copyright.png

is RGB, indexed color (127 colors), 24 bits.

Forcing imagecreatetruecolor in Image.php seems to fix the first thumbnail:

if ( true ) {
     $dst_image = imagecreatetruecolor( $width, $height );

but doesn't work for the second image, possibly because it has a transparent
background.

I'm unsure if this is related to bugs 6205, 5994 or 234, but is reproducible on
our installation with libpng 1.2.16 and gd 2.0.34.


Version: 1.9.x
Severity: normal
OS: Mac OS X 10.0
Platform: Macintosh
URL: http://wikidiy.com/mediawiki-1.9.1/index.php/Main_Page

Details

Reference
bz9055

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:36 PM
bzimport set Reference to bz9055.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

GD is a bit rubbish for this sort of thing; use ImageMagick if possible.

tderouin wrote:

Great! This seems to fix the issue for me.

Duping this to bug 8038...

  • This bug has been marked as a duplicate of bug 8038 ***