PHP GD Rezize (daha büyük veya daha küçük)

0 Cevap php

İşte benim senaryom

<?php
$user = $_GET['u'];
$src = imagecreatefrompng("http://www.website.com/".$user.".png");
$dest = imagecreatetruecolor(8, 8);
imagecopy($dest, $src, 0, 0, 8, 8, 80, 40);
header('Content-Type: image/png');
imagepng($dest);


imagedestroy($dest);
imagedestroy($src);
?>

Id like to so that the 8 by 8 image can be resized using GET. Since its a 8 by 8 square and keeping the ratio, maybe something like s=20 so that it turns from 8x8 to 20x20. The 8,8 in ImageCopy is a crop.

0 Cevap