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.(PECL gmagick >= Unknown)
Gmagick::compositeimage — Compone una imagen en otra
Compone una imagen en otra en el índice especificado.
sourceObjeto Gmagick que contiene la imagen compuesta
COMPOSEOperador de composción.
xEl índice de columna de la imagen compuesta.
yEl índice de fila de la imagen compuesta.
El objeto Gmagick con composiciones.
Emite una excepción GmagickException en caso de error.
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.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');
?>