This commit is contained in:
Abdulrahman
2019-06-01 00:12:01 +03:00
parent 26d98d3287
commit cf662b14e3

View File

@@ -24,8 +24,15 @@ if (! defined('IN_COMMON'))
*/
function helper_watermark($name, $ext)
{
$return = false;
is_array($plugin_run_result = Plugins::getInstance()->run('helper_watermark_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if ($return)
{
return;
}
//is this file really exsits ?
if (! file_exists($name))
{
@@ -169,12 +176,12 @@ function helper_watermark_imagick($name, $ext, $logo)
if ($ext == 'gif')
{
$i = 0;
//$gif_new = new Imagick();
//$gif_new = new Imagick();
foreach ($im as $frame)
{
$frame->compositeImage($watermark, imagick::COMPOSITE_OVER, $x, $y);
// $gif_new->addImage($frame->getImage());
// $gif_new->addImage($frame->getImage());
if ($i >= 10)
{
// more than 10 frames, quit it