Hi all,
So, a while ago i started to develop Habbo's avatarimage.php..
In the most retro-websites we use:
http://www.habbo.nl/habbo-imaging/av...ure=sml&size=b
What if Habbo is in maintenance or Habbo is offline.. And we don't cache it.. What do we do now?
Well, i've a solution!
A couple of days ago, i've started developing a Class called Avatar.
This Class read's al the needed files, figuredata.xml, animation.xml and stuff and makes an full avatar out it.
Code Snippet
PHP Code:
<?php
function imagerecolor(&$image, $red, $green, $blue)
{
$width = imagesx($image);
$height = imagesy($image);
for($x = 0; $x < $width; $x++)
{
for($y = 0; $y < $height; $y++)
{
$rgb = imagecolorsforindex($image, imagecolorat($image, $x, $y));
$r = $rgb['red'];
$g = $rgb['green'];
$b = $rgb['blue'];
$a = $rgb['alpha'];
$r = (($red / 255) * $r);
$g = (($green / 255) * $g);
$b = (($blue / 255) * $b);
imagesetpixel($image, $x, $y, imagecolorallocatealpha($image, $r, $g, $b, $a));
}
}
}
?>
This snippet comes directly out of Pixel(Time)CMS.
Samples








Well, i haven't seen an retro yet with an own avatarimage.php script.. So i thought.. I'll make it!
Bas