Page MenuHomePhabricator

Transparent PNGs resized with GD display with ugly background in IE 6
Closed, DeclinedPublic

Description

PNG images can contain a bKGD chunk which defines a background color; this is used for instance by Internet Explorer 6.0 when displaying PNGs with multiple-bit alpha transparency.

When we resize PNGs with ImageMagick, we specify a white background color, which is usually an acceptable fallback for decent display in IE 6 and generic image viewers. When resizing with GD, no background color gets set. IE 6 ends up displaying its generic ugly bluish grayish background, which is fairly unattractive.

Unfortunately the GD library doesn't appear to provide any interface for setting the background color. It might be relatively easy to hack up the file after saving, though, and add a hardcoded background chunk. :)

Just a minor thing, but it's these little things that keep people happy.


Version: 1.11.x
Severity: enhancement

Details

Reference
bz11045

Event Timeline

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

Adding testme. Please test with Internet Explorer 8 and note the result here.

IE8 results would be useless, as this is only relevant to browsers *not* supporting alpha transparency in PNGs; these (eg, IE 6 or below) will display the background color chunk instead.

Is this the same issue as bug 234 ?

I'm going to go out on a limb and mark this WONTFIX; workaround of installing ImageMagick should work for most any site that finds they care about this issue still in 2011. :)

Wikimedia not affected.

Restricted Application added subscribers: TerraCodes, Matanya. · View Herald Transcript