Created
February 11, 2011 11:17
-
-
Save ckwalsh/822217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Include the files/set up autoloading */ | |
$packer = new Sprite_Packer_Greedy_Heap(); | |
$map = new Sprite_Map($packer); | |
$images = array(); | |
$images[] = new Sprite_Image_Url('http://static.reddit.com/reddit.com.header.png'); | |
$images[] = new Sprite_Image_Url('http://static.php.net/www.php.net/images/php.gif'); | |
foreach ($images as $img) { | |
$map->addImage($img); | |
} | |
var_dump($map->getBlocks()); | |
imagepng($map->getImage(), 'out.png'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment