note 52252 added to function.imagecolorat
| From: | sysNOSPAMcoder at gmail dot NOSPAM dot com | Date: | Tue, 26 Apr 2005 10:40:12 +0000 |
| Subject: | note 52252 added to function.imagecolorat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88554@lists.php.net to get a copy of this message | ||
Just for fun: another snippet for drawing images using html only X)
<html>
<head>
<style>
<!--
body {
font-family: courier new, courier;
font-size: 7pt;
background: #000000;
color: #000000;
}
-->
</style>
</head>
<body>
<font color="#000000">
<?php
$im = ImageCreateFromPng($_GET['img']);
$lastcolor=0;
for($y=0;$y<imagesy($im);$y++)
{
for($x=0;$x<imagesx($im);$x++)
{
$pixel = ImageColorAt($im, $x, $y);
if($lastcolor != $pixel)
{
printf('</font><font color="#%06x">', $pixel);
$lastcolor = $pixel;
}
echo "*";
}
echo "<br />";
}
?>
</font>
</body>
</html>
----
Manual Page -- http://www.php.net/manual/en/function.imagecolorat.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52252
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52252&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52252&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52252&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52252&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52252&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52252&report=yes
Search -- http://master.php.net/manage/user-notes.php