/**
* Add a watermark to an image with the specified opacity
*
* @param AdapterInterface $watermark
* @param int $offsetX
* @param int $offsetY
* @param int $opacity
*
* @return AdapterInterface
*/
public function watermark(
<AdapterInterface> watermark,
int offsetX = 0,
int offsetY = 0,
int opacity = 100
) -> <AdapterInterface> {
var op, x, y;
let x = this->checkHighLow(
offsetX,
0,
this->width - watermark->getWidth()
);
let y = this->checkHighLow(
offsetX,
0,
this->height - watermark->getHeight()
);
let op = this->checkHighLow(opacity);
this->{"processWatermark"}(watermark, x, y, opacity);
return this;
}
... so offsetY is not used.
Well... it is a little mistake.
Describe the bug: Offset for watermark on image do not work.
This is part of zephir 5.8.0 file (https://github.com/phalcon/cphalcon/blob/master/phalcon/Image/Adapter/AbstractAdapter.zep):
... so offsetY is not used. Well... it is a little mistake.
Greetings