Home > php教程 > php手册 > body text

将图片转为html格式

WBOY
Release: 2016-06-21 09:06:04
Original
2175 people have browsed it


//将图片转为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



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template