Either one of the two sizes when done alone will work okay (I get the 450 and 100 sizes) but doing both together doesn't work. Any ideas? thanks
Code: Select all
$largeImgName=$_FILES['imgLarge']['name'];
// ------------------------ IMAGE MAGICK ---------------------------
// Temporary upload image name
$originalLarge_image = $_FILES['imgLarge']['tmp_name'];
// set the jpg quality
$theQualityLarge=75;
// Get the image dimensions
$sizeLarge=GetImageSize( $originalLarge_image );
// Maximum image width
$max_widthLarge = "450";
// Maximum image height
$max_heightLarge = "450";
// Resize the image and save
exec("convert -size {$sizeLarge[0]}x{$sizeLarge[1]} $originalLarge_image -thumbnail $max_widthThumbx$max_widthThumb -quality $theQualityLarge $largeImgName");
@copy($largeImgName,"/home/jmthieme/public_html/flashRev7/testLarge/".$largeImgName) or die("Couldn't copy the Large image.");
echo "<img src=\"".$largeImgName."\">";
echo "File uploaded<br>";