Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $im = imagecreatefrompng("http://img2.wikia.nocookie.net/__cb20130530155332/cityville/images/3/30/Viral_hybridbuildingwizardtower_wizard_hat_64x64.png");
- $colors = imagecolorsforindex($im, $rgb);
- for ($y=0; $y<=64; $y++) {
- for ($x=0; $x<=64; $x++) {
- $rgb = imagecolorat($im,$x,$y);
- $colors = imagecolorsforindex($im, $rgb);
- echo dechex($colors["red"]).dechex($colors["green"]).dechex($colors["blue"])." ";
- }
- echo "<br>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement