懂PHP的朋友帮个小忙。100分
由于在PHP技术上的欠缺。所以肯请侠客们帮忙。把它转成ASP的
内容如下:
<?php
error_reporting(0);
$w = (int)$_POST['width'];
$h = (int)$_POST['height'];
$img = imagecreatetruecolor($w, $h);
imagefill($img, 0, 0, 0x669966);
$rows = 0;
$cols = 0;
for($rows = 0; $rows < $h; $rows++){
$c_row = explode(",", $_POST['px' . $rows]);
for($cols = 0; $cols < $w; $cols++){
$value = $c_row[$cols];
if($value != ""){
$hex = $value;
while(strlen($hex) < 6){
$hex = "0" . $hex;
}
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
$b = hexdec(substr($hex, 4, 2));
$test = imagecolorallocate($img, $r, $g, $b);
imagesetpixel($img, $cols, $rows, $test);
}
}
}
$filename="upfiles/".date("Y-m-d-H-i-s",time()).".jpg";
header("Content-type:image/jpeg");
imagejpeg($img, $filename, 90);
header("Location: $filename");
?>
问题点数:100、回复次数:13Top
1 楼aniude(重返荣耀)回复于 2006-03-01 15:05:34 得分 5
无语.......Top
2 楼lougoo(张小鱼)回复于 2006-03-01 15:17:44 得分 0
哥怎么了呀?Top
3 楼ybfqlyq(Rossy|http://blog.ybfq.com)回复于 2006-03-01 15:18:18 得分 10
$img = imagecreatetruecolor($w, $h);
關於圖像處理的用ASP很難操作!!Top
4 楼lougoo(张小鱼)回复于 2006-03-01 15:34:52 得分 0
那困难了Top
5 楼Php_Little_Bear(菜子)回复于 2006-03-01 16:10:37 得分 20
用的什么操作系统啊.如果是linux可以用ImageMagick,来做Top
6 楼cqf820()回复于 2006-03-01 18:15:04 得分 5
踩踩
什么问题啊。》??Top
7 楼kiraymd(紫胤)回复于 2006-03-01 20:31:57 得分 10
现在好像有自动把php转成asp的工具?!Top
8 楼ccxxcc(cc小超)回复于 2006-03-01 20:48:36 得分 15
函数不支持 用工具有什么用?人都干不了 机器就能?
如果有asp的第三方图形处理类库Top
9 楼Gdj(陈水.智商只有129.非卖品)回复于 2006-03-02 08:36:13 得分 10
asp因为先天缺陷,写不了这样的代码。用asp+c吧。Top
10 楼arcow(冲星)回复于 2006-03-02 08:53:53 得分 5
asp能处理图形吗?Top
11 楼xuzuning(唠叨)回复于 2006-03-02 10:27:01 得分 10
.netTop
12 楼xuzuning(唠叨)回复于 2006-03-02 10:28:21 得分 10
参见
http://www.webjx.com/htmldata/2006-01-21/1137824356.htmlTop
13 楼lougoo(张小鱼)回复于 2006-03-02 10:49:44 得分 0
感谢朋友们这么热情Top




