Anyone having a problem using applyMask method in WideImage library for PHP?
This is the code I have and it seems it should be pretty straightforward but it’s not working.
$image = WideImage::load($tempfile);
$mask = dirname(__FILE__)."/../images/okvircki.png";
$mask_wi = WideImage::load($mask);
$image->applyMask($mask_wi,0,0);
$image->saveToFile('image_egg.png');
$tempfile is a JPG and $mask a greyscale PNG. The end result is the same as tempfile img.
Any ideas?
“applayMask()” (as any other WideImage method) returns the modiffied resource and does not modify the resource it was called on.
This means you have to do something like this: