PHP:拡大・縮小・カット・透かし

2645 ワード

画像の拡大・縮小:
#1枚の大きな図を異なる小さな図imagecopyresampled(d s t i m g,dstimg,dstimg,srcimg,0,0,0381251910600)に略記する.imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool
imagecopyresampled()は、1枚の画像の正方形領域を別の画像にコピーし、画素値を滑らかに挿入するため、特に画像のサイズを小さくしても大きな明瞭度を維持する.
パラメータ
dst_image

src_image

dst_x
   X    。

dst_y
   Y    。

src_x
   X    。

src_y
   Y    。

dst_w

dst_h

src_w

src_h

戻り値
成功時にTRUEに戻るか、失敗時にFALSEに戻る.
**


画像の切り取り:
imagecopyresampled( d s t i m g , dstimg, dstimg,srcimg,0,0,200,200,381,251,300,200); **


画像透かし:
imagecopy( d s t i m g , dstimg, dstimg,srcimg,810,500,0,0,100,100);
説明imagecopy(resource$dst_im,resource$src_im,int$dst_x,int$dst_y,int$src_x,int$src_y,int$src_w,int$src_h):bool
src_をim画像の座標はsrc_からx,src_yから始まり、幅はsrc_w,高さsrc_hの一部をdst_にコピーim画像における座標はdst_xとdst_yの位置にあります.
左上隅


右下に打つ


**


**