Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $destination = $_GET['route'];
- if (eregi("^(.+)-iphone\.(.+)$",$destination,$r)) {
- header("Content-type: image/".$r[2]);
- $original = $r[1].".".$r[2];
- if (file_exists($original) && !eregi("iphone-gui\.png$",$original)) {
- $or = new Imagick($original);
- $or->setCompression(Imagick::FILTER_LANCZOS);
- $or->ThumbnailImage(160,240,true);
- $im = new Imagick(dirname(__FILE__).'/iphone-gui.png');
- $im->compositeImage($or,Imagick::COMPOSITE_DEFAULT,18,60);
- $im->writeImage($destination);
- echo file_get_contents($destination);
- }
- }
- header("HTTP/1.0 404 Not Found");
- ?>
Add Comment
Please, Sign In to add comment