downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Imagick::clear> <Imagick::charcoalImage
[edit] Last updated: Tue, 21 May 2013

view this page in

Imagick::chopImage

(PECL imagick 2.0.0)

Imagick::chopImage画像の一部を取り除き、切り詰める

説明

bool Imagick::chopImage ( int $width , int $height , int $x , int $y )

画像の一部を削除し、そこにあった画像をなくします。

パラメータ

width

切り取る範囲の幅。

height

切り取る範囲の高さ。

x

切り取る範囲の X 座標。

y

切り取る範囲の Y 座標。

返り値

成功した場合に TRUE を返します。

エラー / 例外

エラー時に ImagickException をスローします。

例1 Imagick::chopImage() の使用法

Imagick::chopImage の使用例です。

<?php
/* オブジェクトの作成 */
$image = new Imagick();
$pixel = new ImagickPixel'gray' );

/* 新しい画像 */
$image->newImage(400200$pixel);

/* 画像の切り取り */
$image->chopImage(20020000);

/* 画図おフォーマットの指定 */
$image->setImageFormat('png');

/* ヘッダをつけて画像の出力 */
header('Content-type: image/png');
echo 
$image;

?>

参考



add a note add a note User Contributed Notes Imagick::chopImage - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites