rallek / Classifieds

2 stars 0 forks source link

watermark for the pictures #10

Open rallek opened 10 years ago

rallek commented 10 years ago

imagine gives the possibility to create watermarks. It should be added in the \Classifieds\lib\Classifieds\Util\Image.php

see: http://imagine.readthedocs.org/en/latest/usage/introduction.html#image-watermarking

$watermark = $imagine->open('/my/watermark.png');
$image     = $imagine->open('/path/to/image.jpg');
$size      = $image->getSize();
$wSize     = $watermark->getSize();

$bottomRight = new Imagine\Image\Point($size->getX() - $wSize->getX(), $size->getY() - $wSize->getY());

$image->paste($watermark, $bottomRight);
rallek commented 10 years ago

needed for #15