Gmagick::compositeimage

(PECL gmagick >= Unknown)

Gmagick::compositeimageComposite one image onto another

Description

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

Composite one image onto another at the specified offset.

Parameters

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

Return Values

The Gmagick object with compositions.

Errors/Exceptions

Throws an GmagickException on error.

Коментарии

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($imgBarcode1$width150);
//Write the current image at the current state to a file
$imgMain->write('withBarcode.tiff');

?>
2011-08-04 03:03:21
http://php5.kiev.ua/manual/ru/gmagick.compositeimage.html
Автор:
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.
2011-09-07 21:59:25
http://php5.kiev.ua/manual/ru/gmagick.compositeimage.html

    Поддержать сайт на родительском проекте КГБ