Home >php教程 >php手册 >将图片转为html格式

将图片转为html格式

WBOY
WBOYOriginal
2016-06-21 09:06:042206browse


//将图片转为html格式,需要GD库支持。转换成html文件后文件非常大。所以,程序本身并不实用!
function htmlimg($im,$zf="█",$size="8"){
    $im=imagecreatefromjpeg($im);
    $width=imagesx($im);
    $height=imagesy($im);
    echo "

";
    for($s=1;$s        for($i=1;$i            $as=imagecolorat($im,$i,$s);
            echo "".$zf."";
        }
        echo "
";
    }
    ImageDestroy($im);
    echo "

";
}
htmlimg('01image.jpg');
?>

原文:http://phpip.com/article/2006/0705/article_34.html 标识:1152078831
本文引用地址:h



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn