Hello,
Can somebody help me please? I use the code below to make thumbnails. Thumbnails are created in size 120x100. What i need is to set size only for thumbnail width so that the height is created proportionally to width.
Thank you.
function makeThumb( $scrFile, $dstFile, $dstW=120, $dstH=100 )
{
$im = ImageCreateFromJPEG( $scrFile );
$srcW = ImageSX( $im );
$srcH = ImageSY( $im );
$ni = ImageCreate( $dstW, $dstH );
ImageCopyResized( $ni, $im, 0, 0, 0, 0, $dstW, $dstH, $srcW, $srcH );
ImageJPEG( $ni, $dstFile );
}