Change Width of a Picture


Current Image

Poster

Select Width Change (0 = No, 5 = Max Change)

Width Determination:

0   1   2   3   4   5  





SLAVE CODE FOLLOWS

<?php
$skinny 
$_GET['sk'];
// get the images from files
$image imagecreatefromjpeg("plan_9.jpg");

// get sizes of original
$width_orig imagesx($image);
$height imagesy($image);

// adjust the width for the new image
$width $width_orig - ($width_orig $skinny .05);

// create a new image
$new_image imagecreatetruecolor($width$height);

// resample old to new image
imagecopyresampled($new_image$image0000$width$height$width_orig$height);

// set the header for the new image
header("Content-type: image/jpeg");
imagejpeg($new_image);
imagedestroy($new_image);

?>