説明
  
   bool 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
)
  
  
 
  パラメータ
  
   
    
     - 
dst_image
- 
      コピー先の画像リソース。 
- 
src_image
- 
      コピー元の画像リソース。 
- 
dst_x
- 
      
       コピー先の x 座標。
       
- 
dst_y
- 
      
       コピー先の y 座標。
       
- 
src_x
- 
      
       コピー元の x 座標。
       
- 
src_y
- 
      
       コピー元の y 座標。
       
- 
src_width
- 
      コピー元の幅。 
- 
src_height
- 
      コピー元の高さ。 
 
 
  戻り値
  
   成功した場合に true を、失敗した場合に false を返します。
  
  
 
 
  例
  
  
   例1 PHP.net のロゴの切り取り
   
<?php
// 画像のインスタンスを作成します
$src = imagecreatefromgif('php.gif');
$dest = imagecreatetruecolor(80, 40);
// コピーします
imagecopy($dest, $src, 0, 0, 20, 13, 80, 40);
// 出力してメモリから解放します
header('Content-Type: image/gif');
imagegif($dest);
?>