Tengo una galeria en la cual se generan thumbs, pero se generan de 138 x 138, y los quiero de 138x92
Como hago para cambiar la medida en la cual el sistema corta las fotos ? Este es el archivo:
Código PHP:
<?php
//Thumbnail save settings, feel free to change these. Pre-existing thumbnails need to be deeted for the changes to take effect!!!
$thumbsize = "138"; // Thumbnail size.
$thumbquality = "100"; //the thumbnail JPEG quality.
// Image folder
$images = $_GET['imagefolder'];
// Thumbnail folder
$thumbnails = $_GET['thumbfolder'];
// The file you are resizing
$file = $_GET['im'];
//image name:
$tn_name = $_GET['name'];
// This sets it to a .jpg, but you can change this to png or gif
header('Content-type: image/jpeg');
// Setting the resize parameters
list($width, $height) = getimagesize($file);
if ($width == $height) {
$modwidth = $thumbsize;
$modheight = $thumbsize;
}
else if ($width < $height) {
$zoom = $thumbsize / $width;
$modwidth = $thumbsize;
$modheight = $height * $zoom;
$dstx = 0;
$dsty = ($thumbsize - $modheight)/2;
}
else {
$zoom = $thumbsize / $height;
$modheight = $thumbsize;
$modwidth = $width * $zoom;
$dstx = ($thumbsize - $modwidth)/2;
$dsty = 0;
}
// Resizing the Image
$tn = imagecreatetruecolor($thumbsize, $thumbsize);
$image = imagecreatefromjpeg($file);
imagecopyresampled($tn, $image, $dstx, $dsty, 0, 0, $modwidth, $modheight, $width, $height);
ACA SIGUE PERO NO ES IMPORTANTE..
Gracias de antemano por su ayuda...