- 追加された行はこの色です。
- 削除された行はこの色です。
- プログラミング/imagemagick へ行く。
*convert [#b09dd70e]
**指定した大きさの真ん中に任意の画像を配置 [#bb741b26]
#pre{{
function createImage($org_file, $width, $height) {
$size = getimagesize($org_file);
$e_org_file = escapeshellarg($org_file);
$in_width = $width * 0.8;
$in_height = $height * 0.8;
$command = "convert -thumbnail {$in_width}x{$in_height} jpg:{$e_org_file} jpg:- | "
."convert -size {$width}x{$height} xc:white jpg:- -gravity center -composite jpg:-";
header("Content-type: image/jpeg");
passthru($command);
}
}}