// We initialize a layer object which has the norway picture as a background
// This layer will have the width and the height of the picture
$norwayLayer = new ImageWorkshop(
"imageFromPath" => "/path/to/images/norway.jpg"
// We initialize another layer object which has the watermark as a background
$watermarkLayer = new ImageWorkshop(
"imageFromPath" => "/path/to/images/watermark.png"
// Initialization of a document layer without specifying the path to an image.
// It will have a transparent background, we need to specify its width and height
$documentLayer = new ImageWorkshop(array(
"width" => $norwayLayer->getWidth(), // Same width than $norwayLayer
"height" => $norwayLayer->getHeight(), // Same height than $norwayLayer
// Now, we will add the picture layer in the document stack (of sublayers)
// We place $norwayLayer at the level 1 (just on the document background top)
// $watermarkLayer must be on the top of $norwayLayer background (so level 2) !
// We choose the position from the document borders:
// 12pixels from Left, 12pixels from Bottom ("LB") for example
$documentLayer->addLayer(2, $watermarkLayer, 12, 12, "LB");