ico制作代码

时间:2022-05-19 12:30:16 阅读: 最新文章 文档下载
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。


$output = "";

if(isset($_GET['action'])&&$_GET['action'] == 'make'){ if(isset($_FILES['upimage']['tmp_name']) && $_FILES['upimage']['tmp_name'] &&

is_uploaded_file($_FILES['upimage']['tmp_name'])){ if($_FILES['upimage']['type']>210000){

echo "你上传的文件体积超过了限制 最大不能超过200K"; exit(); }

$fileext = array("image/pjpeg","image/gif","image/x-png"); if(!in_array($_FILES['upimage']['type'],$fileext)){

echo "你上传的文件格式不正确 仅支持 jpggifpng"; exit(); }

if($im = @imagecreatefrompng($_FILES['upimage']['tmp_name']) or @imagecreatefromgif($_FILES['upimage']['tmp_name']) or $im

@imagecreatefromjpeg($_FILES['upimage']['tmp_name'])){ $imginfo = @getimagesize($_FILES['upimage']['tmp_name']); if(!is_array($imginfo)){ echo "图形格式错误!"; }

switch($_POST['size']){ case 1;

$resize_im = @imagecreatetruecolor(16,16); $size = 16; break; case 2;

$resize_im = @imagecreatetruecolor(32,32); $size = 32; break;

case 3;

$resize_im = @imagecreatetruecolor(48,48); $size = 48; break;

default;

$resize_im = @imagecreatetruecolor(32,32); $size = 32; break; }

imagecopyresampled($resize_im,$im,0,0,0,0,$size,$size,$imginfo[0],$imginfo[1]); include "phpthumb.ico.php";

$icon = new phpthumb_ico();

$gd_image_array = array($resize_im);

$icon_data = $icon->GD2ICOstring($gd_image_array);

$im = =


$filename = "temp/".date("Ymdhis").rand(1,1000).".ico";

if(file_put_contents($filename, $icon_data)){

$output = "->
href='download.php?var=http://wangwei.web-70.com/$filename' target='_blank'>点击下载(迅雷专区)
你也可以直接保存";
}

}else{

echo "生成错误请重试!"; } } } ?>













</word><word ps='' class=''>红雨在线</word><word ps='' class=''>-ico</word><word ps='' class=''>图标制作</word><word class=''>





ICO图标在线转换


















if($output){ echo

"
"; } ?>



请上传你要转换的图片
支持格式 pngjpggif
目标尺寸:



style=\"border:1px

solid

#D8D8B2;background-color:#FFFFDD;padding:10px\">".$output."
style="font-size:25px;">Powered by redrain  ->href="http://veryim.com" target="_blank">非常爱漫



本文来源:https://www.wddqw.com/doc/f4af7d0a84c24028915f804d2b160b4e767f810a.html