Hi,
I have a script that already resizes an image perfectly and stores it in a file. What I want to do is, at the same time save a slightly smaller image in another directory. It shoud be really simple seeing as I have already done everything once and it should be a case of doing the same thing.
My file does a lot of manipulations to get all images out at 300 by 225 so I just want to get the final image and make it a bit smaller.
I have this code (I have just pasted the new bit that doesnt work) but all it gives me is a poor quality black and white image. I think I am using the wrong source file.
$im4 = imagejpeg($filler_img, $path.$newfotoname, 75);
imagedestroy($src_img);
// imagedestroy($dst_img);
@copy($im4, $path.$newfotoname);
//----------------------------------------------------------------------
// Here we create the thumbnail from the image created above
$pathmain = $_SERVER['DOCUMENT_ROOT'] . '/fotos_coches/main/';
$dst = ImageCreate(200, 150);
ImageCopyResampled($dst, $dst_img, 0,0,0,0, 200, 150, 300, 225);
error_reporting(0);
header("Content-type: image/jpeg");
ImageJPEG($dst, $pathmain.$newfotoname, 75);
ImageDestroy($src);
ImageDestroy($dst);
Notice I am using the $dst_img of the first manipulation but I have also tried using $im4
I have even tried running the whole code again but with diferent parameters but there seems to be a problem with manipulting the same image file twice.