$im = imagecreatefrompng('1.png');
//缺少这一句png将和原图有差别
imagesavealpha($im, true);
header('Content-type:image/png');
imagepng($im);
imagedestroy($im);
?>
$im = imagecreatefrompng('1.png');
//缺少这一句png将和原图有差别
imagesavealpha($im, true);
header('Content-type:image/png');
imagepng($im);
imagedestroy($im);
?>
Tags: PHP
This entry was posted on 2010年01月18日, 9:42 下午 and is filed under 网站框架. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
apache AutoCAD DNS editplus firefox Google Google优化 PDF PHP Zend 事件ID查看 仲裁法 优化网站 合同法 安全分析 安全管理 局域网共享 平时在干嘛 建筑法 建设工程 招标投标法 搜索引擎 政府采购法 服务器维护 杀病毒 权限分配 查木马 正则 民法通则 注册码 注册表 清醒 百度优化 站点优化 系统日志 网站推广 网站框架 解决办法 软件应用 运营基础知识 退出中国 逆火日志 造价 飞碟 鲁班
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
|
#1 by Defy on 2010年01月18日 - 9:45 下午
Quote
收藏的其它办法
function correctPNG()
{
{
for(var i=0; i
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = " + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\">”
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent(“onload”, correctPNG);