Convert Gambar Ke Text dengan PHP
Assalamualaikum Wr. Wb.
seiring berkembangnya jaman, ternyata ga cuma Photoshop dan sebangsanya doang yang bisa edit foto .. PHP pun bisa !
. walau hasilnya ga sedetail pake software image editor, tapi ini ga kalah menariknya kok 

langsung aja , contoh image yg uda di convert k text pake PHP
ini kodenya
begitu aja dulu ..
Wassalam.
credit :http://www.forumphp.web.id/phpforum_10276_Convert_Gambar_Ke_Text_dengan_php[keren].html
seiring berkembangnya jaman, ternyata ga cuma Photoshop dan sebangsanya doang yang bisa edit foto .. PHP pun bisa !
langsung aja , contoh image yg uda di convert k text pake PHP
PHP Code:
<?php $locate= 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/211701_100000663625714_2046620_n.jpg'; //ini bs dgnt pake link ente :wow :wow
$image = imagecreatefromjpeg("$locate");
if ($image) {
echo '<PRE STYLE="font: 5px/5px Courier New;">';
$asciichars = array("@", "#", "+", "*", ";", ":", ",", ".", "`", " ");
$width = imagesx($image);
$height = imagesy($image);
for($y = 0; $y < $height; ++$y) {
for($x = 0; $x < $width; ++$x) {
$thiscol = imagecolorat($image, $x, $y);
$rgb = imagecolorsforindex($image, $thiscol);
$brightness = $rgb['red'] + $rgb['green'] + $rgb['blue'];
$brightness = round($brightness / 85);
$char = $asciichars[$brightness];
echo $char;
}
echo "\n";
}
echo '</PRE>';
} ?>
begitu aja dulu ..
Wassalam.
credit :http://www.forumphp.web.id/phpforum_10276_Convert_Gambar_Ke_Text_dengan_php[keren].html
Tidak ada komentar:
Posting Komentar