I am trying to merge two images and save it as a new asset and I am using the PHP function called "imagecopymerge" (https://www.php.net/manual/en/function.imagecopymerge.php) however thats returning a "resource" and I have tried figuring out how I can turn that "resource" into something I can use to save using perhaps $tempath?

$newAsset = new Asset();
$newAsset->avoidFilenameConflicts = true;
$newAsset->tempFilePath = $tempPath;

You'll need to save the image to the filesystem and use that path as $tempPath.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.