Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Copy part of an image
imagecopy(    GdImage $dst_image,    GdImage $src_image,    int $dst_x,    int $dst_y,    int $src_x,    int $src_y,    int $src_width,    int $src_height): bool
            $base $image->getDriver()->newImage($width$height)->getCore();

            
imagecopy($base$resource0000$width$height);




            
imagefill($resource$x$y$filling);
            imagefill($resource$x$y$filling);




            
imagecopy($base$resource0000$width$height);




            
$image->setCore($base);
        imagealphablending($image->getCore(), true);

        return 
imagecopy($image->getCore(), $watermark->getCore(), $target->x$target->y00$watermark_size->width$watermark_size->height);

    }

}
        imagecolortransparent($resource$matte);




        
imagecopy($resource$image->getCore(), 0000$size->width$size->height);



        if (
is_numeric($count) && $count <= 256) {
        imagefilledrectangle($canvas->getCore(), $dst_x$dst_y$dst_x $src_w 1$dst_y $src_h 1$transparent);




        
imagecopy($canvas->getCore(), $image->getCore(), $dst_x$dst_y$src_x$src_y$src_w$src_h);




        
$image->setCore($canvas->getCore());
        imagealphablending($canvastrue);




        
imagecopy($canvas$resource0000$width$height);

        
imagedestroy($resource);



        
$resource $canvas;
        $transparency imagecolorallocatealpha($clone000127);

        
imagefill($clone00$transparency);

        

        
imagecopy($clone$core0000$width$height);



        return 
$clone;

    }