<html>
<head>
<title>peeweejd's color-o-matic picture to text thingamadoodle</title>
<style>
h1, h2, h3, h4 {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 14px;
}
p {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size:12px;
}
body {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size:12px;
background-color: #c1c2c9;
}
a:link, a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
text-decoration: underline;
}
img {
border: 0px;
}
div.container{
}
div.float {
float: left;
height: 120px;
padding: 15px;
text-align: center;
background-color: #b1b3bc;
}
div.spacer {
clear: both;
}
div.float:hover {
background-color: #ffffff
}
</style>
</head>
<body>
<h1>peeweejd's color-o-matic picture to text transmogrificatorinizeration page</h1>
<?php
if($file_name) {
$im = ImageCreateFromPNG($file_name);
$width = imagesx($im);
$height = imagesy($im);
echo "<p>copy all this crap in teh text box and paste it into a new post, reply or a PM...<br />\n";
echo "<textarea rows=\"20\" cols=\"60\">";
for ($cy=0;$cy<$height;$cy++) {
for ($cx=0;$cx<$width;$cx++) {
$rgb = ImageColorAt($im, $cx, $cy);
$col = imagecolorsforindex($im, $rgb);
printf('[hl=%02x%02x%02x][color=%02x%02x%02x]. .[/color][/hl]', $col["red"], $col["green"], $col["blue"], $col["red"], $col["green"], $col["blue"]);
}
echo "\n";
}
echo "</textarea></p>\n";
$imgheight=15*$height;
$imgwidth=15*$width;
echo "<p>this is kinda what it will look like on the boards...<br/>\n";
echo "<img src=\"$file_name\" width=\"$imgwidth\" height=\"$imgheight\" /></p>";
}
?>
<p>Click on an image to make a IGN boards markup thing for it...</p>
<p>
<?php
$myDirectory = opendir(".");
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}
closedir($myDirectory);
$indexCount = count($dirArray);
sort($dirArray);
for($index=0; $index< $indexCount; $index++) {
$fileparts = explode("." , $dirArray[$index]);
$img_filetype = $fileparts [1];
if ($img_filetype=="png") {
print("<a href=\"?file_name=$dirArray[$index]\"><img src=\"$dirArray[$index]\" border=\"0\" /></a>\n");
}
}
?>
</p>
<p>
this was made by <b><a href="http://users.ign.com/about/peeweejd">peeweejd</a></b><br />
if you want to see how this thing works, <a href="source.php">check out this link...</a> i highly recomend it...
if you want me to add a picture or whatever, you can find me on the boards, <a href="http://boards.ign.com/pm_send.asp?usr=515429"> send me a private message</a> or grab me on AIM (peeweejd69).. no go fuck off...
</p>
</body>
</html>