protected function alignImageWatermark($source)
    {
        if( is_string($this->target ?? NULL) )
        {
            $size = getimagesize($source);

            $this->width  = $this->width  ?? $size[0];
            $this->height = $this->height ?? $size[1];

            $return = WatermarkImageAligner::align($this->target, $this->width, $this->height, $this->imageSize[0], $this->imageSize[1], $this->margin ?? 0);

            $this->target = $return;
            
            if( isset($this->x) ) $this->source[0] = $this->x;
            if( isset($this->y) ) $this->source[1] = $this->y;
        }
    }
protected function alignImageWatermark($source)
    {
        if( is_string($this->target ?? NULL) )
        {
            $size = getimagesize($source);

            $this->width  = $this->width  ?? $size[0];
            $this->height = $this->height ?? $size[1];

            $return = WatermarkImageAligner::align($this->target, $this->width, $this->height, $this->imageSize[0], $this->imageSize[1], $this->margin ?? 0);

            $this->target = $return;
            
            if( isset($this->x) ) $this->source[0] = $this->x;
            if( isset($this->y) ) $this->source[1] = $this->y;
        }
    }
protected function alignImageWatermark ( $ source ) { if ( is_string ( $ this -> target ?? NULL ) ) { $ size = getimagesize ( $ source ) ; $ this -> width = $ this -> width ?? $ size [ 0 ] ; $ this -> height = $ this -> height ?? $ size [ 1 ] ; $ return = WatermarkImageAligner :: align ( $ this -> target , $ this -> width , $ this -> height , $ this -> imageSize [ 0 ] , $ this -> imageSize [ 1 ] , $ this -> margin ?? 0 ) ; $ this -> target = $ return ; if ( isset ( $ this -> x ) ) $ this -> source [ 0 ] = $ this -> x ; if ( isset ( $ this -> y ) ) $ this -> source [ 1 ] = $ this -> y ; } }
Protected align image watermark
Protected align image watermark