Jpegバイナリを縮小して出力
<?php $source = imagecreatefromstring($binary); $width = imagesx($source); $height = imagesy($source); $newWidth = 220; $newHeight = 164; $newImage = imagecreatetruecolor($newWidth, $newHeight); imagecopyresampled($newImage, $source, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); imagejpeg($newImage, null); imagedestroy($newImage);