私は画像をアップロードするためのHTMLフォームを持っています。アップロードプロセス中にサイズを縮小/縮小したいです。
$uploadDir= "/uploads";
$imageName= $_FILES['image']['name'];
$tempPath = $_FILES['image']['tmp_name'];
move_uploaded_file ($tempPath,$uploadDir);
リサイズ縮小:
convert $imageName -resize 800x600 -strip -quality 50 -interlace line output.jpg
サムネイル:
convert $imageName -resize x120 -gravity center -crop 120x120+0+0 +repage thumb_output.jpg
Imagick を使用するのはこれが初めてです。
ありがとうございました