|
Cookbook /
PngAlphaIESummary: Steps for displaying PNG images with 8bit alpha transparency
Version: 0.1 18 Mar 2006
Prerequisites: None
Status: Limited testing
Maintainer: zkarj
Categories: Images
Questions answered by this recipe
DescriptionAdd the following lines to local/config.php
if ((strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'Mac_') == FALSE))
{ $UseAlphaFilter = 1; } else { $UseAlphaFilter = 0; }
This allows for detecting the IE browsers that cannot cope natively with 8bit transparency. Use the following markup to include the image. (:if !enabled UseAlphaFilter:) Attach:trans.png (:if enabled UseAlphaFilter:) (:div id='png1' style='[=width:300px; height:200px; padding:0px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.mysite.com/uploads/Main/trans.png", sizingMethod="image")=]':) (:divend:) (:if:) Elements that you will need to change to suit your own situation are:
Notes
Release Notes
CommentsSee AlsoContributors |