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

search for in the

Gmagick::__construct> <Gmagick::commentimage
[edit] Last updated: Fri, 25 May 2012

view this page in

Gmagick::compositeimage

(PECL gmagick >= Unknown)

Gmagick::compositeimageComposite one image onto another

説明

public Gmagick Gmagick::compositeimage ( Gmagick $source , int $COMPOSE , int $x , int $y )

Composite one image onto another at the specified offset.

パラメータ

source

Gmagick object which holds the composite image

compose

Composite operator.

x

The column offset of the composited image

y

The row offset of the composited image

返り値

The Gmagick object with compositions.

エラー / 例外

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



add a note add a note User Contributed Notes Gmagick::compositeimage
Paul Janik 07-Sep-2011 06:59
The second parameter, $COMPOSE, has 3 usable values:

1 = the image is displayed normally;
2 = the image is displayed on a white background;
3 = the image is display in black on a white background;

Paul.
wallace Lau kok poh 04-Aug-2011 12:03
Quick script for stamping a small image on a large image

#!/usr/bin/php
<?php
//  <wallace@wallacelau.com>
//Instantiate a new Gmagick object
$imgMain = new Gmagick('Torso_F.tiff');

// get the image width
$width = (int) ($imgMain->getimagewidth() /2) - 150;

//Instantiate a barcode img Gmagick object
$imgBarcode = new Gmagick('barcode.jpeg');

//stamp the barcode on top of the Main image
$imgMain->compositeimage($imgBarcode, 1, $width, 150);
//Write the current image at the current state to a file
$imgMain->write('withBarcode.tiff');

?>

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