画像を回転を行う

imagerotate

画像を回転する


サンプル

<?php
	// 200×200の画像リソースを作成
	$im = imagecreate(200, 200);
 
	// 白色を作成
	$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
	// 黒色を作成
	$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
 
	// 短形を描画する
	imagefilledrectangle($im, 50, 50, 150, 150, $black);
 
	// 画像出力
	header("Content-type: image/png");
	$im_rotated = imagerotate($im, 30, 1);	// 画像を回転する
	ImagePNG($im_rotated);
?>
 
 

イメージ



最終更新:2012年08月18日 21:08