webino / WebinoImageThumb

:scissors: Webino™ Image thumbnailer for Zend Framework [LTS] http://webino.github.io/WebinoImageThumb
BSD 3-Clause "New" or "Revised" License
40 stars 21 forks source link

Don't work WaterMark #21

Open DenProgMan opened 8 years ago

DenProgMan commented 8 years ago

Hi, a can't use WaterMark plug-in, it somehow does not work, but resize work's fine.

$watermarkPath = 'public/images/water.png'; $watermarkThumb = $this->thumbnailer->create($watermarkPath); $watermark = $this->thumbnailer->createWatermark($watermarkThumb, [-1,1], 1); $thumb = $this->thumbnailer->create($imagePath, [], [$watermark]); $thumb->save('public/images/res.jpg');

What am I doing wrong?

bacinsky commented 8 years ago

Hi, this is a bug in the PHPThumb library, it doesn't call plugins on save() but on show(), try to get the image as string with getImageAsString() and then save it to the file with file_put_contents()