All pastes #382443 Raw Edit

troop

public php v1 · immutable
·published 2007-03-05 17:26 UTC
rendered paste body
<?php// The file$filename = 'sayfaresimleri/frekansbanner.gif';$percent = 0.5;// Content typeheader('Content-type: image/gif');// Get new dimensionslist($width, $height) = getimagesize($filename);$new_width = $width * $percent;$new_height = $height * $percent;// Resample$image_p = imagecreatetruecolor($new_width, $new_height);$image = imagecreatefromgif($filename);imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);// Output?><a href="#"><? imagegif($image_p, null, 100); ?></a>