Is dat een mogelijkheid?
zo jah 
PHP:
1
| <?Header("Content-type: image/png");include("./include/config.include.php");include($serverinclude . "db.include.php");$sql = "SELECT * FROM galleryid WHERE id='$id'";$result = mysql_query($sql);$value = mysql_fetch_array($result) or die(mysql_error());$sql = "SELECT * FROM galleryphoto WHERE id='$pic' AND galleryid='$id'";$result = mysql_query($sql);$list = mysql_fetch_array($result);$filepath = $value[path] . "/" . $list[photo];// is als /gallery/female/katja_schuurman/plaatje.jpg$inputImg = ImageCreateFromJPEG($filepath);$srcX = imagesx($inputImg);$srcY = imagesy($inputImg);$dstY = 72; // fixed Y for the image. always the same$maxX = 96; // max X for image, if image is smaller it will be centered$ratio = ($srcY / $dstY);$dstX = ($srcX / $ratio);$outputImg = ImageCreateTrueColor($maxX, $dstY);imagefill($outputImg, 0, 0, ImageColorAllocate($outputImg, 255, 255, 255));imagecopyresampled($outputImg, $inputImg,(($maxX - $dstX) / 2),0,0,0, $dstX, $dstY, $srcX, $srcY);imagepng($outputImg);?> |