Not really a question about how to do something, per se...
<!-- m --><a class="postlink" href="http://www.degraeve.com/gif2txt.shtml">http://www.degraeve.com/gif2txt.shtml</a><!-- m -->
Would this be possible in PHP, or is it just a CGI thing? its amazing really, someone had a lot of skill to make that!ummmmmmmm....yeah....that deserves a <!-- m --><a class="postlink" href="wowhttp://24.238.145.68/public/htav.html">wowhttp://24.238.145.68/public/htav.html</a><!-- m --> First off, how long will our little post battle go
Second off, yeah damn coolpost battle?
its coincidence that we've been replying to each other's threads a lot, really... no one else is posting right now I keep checking New Posts and one time it switched from 5 recent posts of mine to 5 recent posts of yours....all in the same threads.
I'm just doing these on the side as a I enjoy some adult beverages and kill off the thought processes in my head with a video game. hmm... i've never clicked that link before, perhaps i'll give it a try you could do it with the gd library.
you would have to create an image from whatever type it is (imagecreatefrompng/gif/jpeg) then you could resize that so you wouldnt have so many pixels, you dont have to though. youd have to then use getimagesize to get the width and the height. then you would loop through all the x and y coordinates while using imgcolorat to get the index of that pixel and then imagecolorsforindex with that index to get the rgb color value. youd then output the html with that rgb value.
<!-- m --><a class="postlink" href="http://www.n-son.com/crap/image2text.php">http://www.n-son.com/crap/image2text.php</a><!-- m -->
heres the php code i used
<?php
$letter = "m";
$image = "happy.gif";
$dim = getimagesize($image);
$im = imagecreatefromgif($image);
for ($x = 0; $x < $dim[0]; $x++) {
for ($y = 0; $y < $dim[1]; $y++) {
$color = imagecolorat($im, $y, $x);
$color = imagecolorsforindex($im, $color);
echo "<b style=\"color:rgb(". $color['red'] .",". $color['green'] .",". $color['blue'] .")\">". $letter ."</b>";
}
echo "<br />";
}
?>heres one that resizes the image so you wont have tons and tons of characters.
<!-- m --><a class="postlink" href="http://www.n-son.com/crap/image2text_resize.php">http://www.n-son.com/crap/image2text_resize.php</a><!-- m -->
$letter = "#";
$image = "jhn.jpg";
$dim = getimagesize($image);
$im_src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/imagecreatefromjpeg($image">http://www.htmlforums.com/archive/index ... peg($image</a><!-- m -->);
$width = 30;
$height = $dim[1]*$width/$dim[0];
$im = imagecreate($width, $height);
imagecopyresampled($im, $im_src, 0, 0, 0, 0, $width, $height, $dim[0], $dim[1]);
for ($x = 0; $x < $height; $x++) {
for ($y = 0; $y < $width; $y++) {
$color = imagecolorat($im, $y, $x);
$color = imagecolorsforindex($im, $color);
echo "<b style=\"color:rgb(". $color['red'] .",". $color['green'] .",". $color['blue'] .")\">". $letter ."</b>";
}
echo "<br />";
}Holy crap n8! That's incredible Cool site n8.
<!-- m --><a class="postlink" href="http://www.degraeve.com/gif2txt.shtml">http://www.degraeve.com/gif2txt.shtml</a><!-- m -->
Would this be possible in PHP, or is it just a CGI thing? its amazing really, someone had a lot of skill to make that!ummmmmmmm....yeah....that deserves a <!-- m --><a class="postlink" href="wowhttp://24.238.145.68/public/htav.html">wowhttp://24.238.145.68/public/htav.html</a><!-- m --> First off, how long will our little post battle go
Second off, yeah damn coolpost battle?
its coincidence that we've been replying to each other's threads a lot, really... no one else is posting right now I keep checking New Posts and one time it switched from 5 recent posts of mine to 5 recent posts of yours....all in the same threads.
I'm just doing these on the side as a I enjoy some adult beverages and kill off the thought processes in my head with a video game. hmm... i've never clicked that link before, perhaps i'll give it a try you could do it with the gd library.
you would have to create an image from whatever type it is (imagecreatefrompng/gif/jpeg) then you could resize that so you wouldnt have so many pixels, you dont have to though. youd have to then use getimagesize to get the width and the height. then you would loop through all the x and y coordinates while using imgcolorat to get the index of that pixel and then imagecolorsforindex with that index to get the rgb color value. youd then output the html with that rgb value.
<!-- m --><a class="postlink" href="http://www.n-son.com/crap/image2text.php">http://www.n-son.com/crap/image2text.php</a><!-- m -->
heres the php code i used
<?php
$letter = "m";
$image = "happy.gif";
$dim = getimagesize($image);
$im = imagecreatefromgif($image);
for ($x = 0; $x < $dim[0]; $x++) {
for ($y = 0; $y < $dim[1]; $y++) {
$color = imagecolorat($im, $y, $x);
$color = imagecolorsforindex($im, $color);
echo "<b style=\"color:rgb(". $color['red'] .",". $color['green'] .",". $color['blue'] .")\">". $letter ."</b>";
}
echo "<br />";
}
?>heres one that resizes the image so you wont have tons and tons of characters.
<!-- m --><a class="postlink" href="http://www.n-son.com/crap/image2text_resize.php">http://www.n-son.com/crap/image2text_resize.php</a><!-- m -->
$letter = "#";
$image = "jhn.jpg";
$dim = getimagesize($image);
$im_src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/imagecreatefromjpeg($image">http://www.htmlforums.com/archive/index ... peg($image</a><!-- m -->);
$width = 30;
$height = $dim[1]*$width/$dim[0];
$im = imagecreate($width, $height);
imagecopyresampled($im, $im_src, 0, 0, 0, 0, $width, $height, $dim[0], $dim[1]);
for ($x = 0; $x < $height; $x++) {
for ($y = 0; $y < $width; $y++) {
$color = imagecolorat($im, $y, $x);
$color = imagecolorsforindex($im, $color);
echo "<b style=\"color:rgb(". $color['red'] .",". $color['green'] .",". $color['blue'] .")\">". $letter ."</b>";
}
echo "<br />";
}Holy crap n8! That's incredible Cool site n8.