Fluffy Cat Image
Select Width Change (0 = no change, 5 = Max Change)
SLAVE CODE FOLLOWS
<?php
$wide = $_GET['sk'];
$image = imagecreatefromjpeg('fluffycat.jpg');
$width_orig = imagesx($image);
$height = imagesy($image);
$width = $width_orig - ($width_orig * $wide * .05);
$new_image = imagecreatetruecolor($width, $height);
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height);
// set the header for the new image
header("Content-type: image/jpeg");
imagejpeg($new_image);
imagedestroy($new_image);
?>
SLAVE CODE FOLLOWS
<?php
$text = "Fluffy Cat";
$image = imagecreatefromjpeg("fluffycat.jpg");
$width = imagesx($image);
$height = imagesy($image);
$font = "arial.ttf";
$black = imagecolorallocate($image, 240, 240, 240);
imagettftext($image, 20, 0, 10, $height - 4, $black, $font, $text);
header("Content-type: image/png");
// display the image
imagepng($image);
// destroy the image (i.e., release memory)
imagedestroy ($image);
?>