开发者

Generate thumbnail from the center of existing bigger image

I've read some time ago about the idea of generating a thumbnail image from a bigger image not starting from the top left corner but from the center of the bigger image.

Can anybody tell how to开发者_开发百科 do that with php?


For resizing of any kind, you usually use one of the imagecopy methods:

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 )

The src_ parameters specify what part of the source image to copy. Just make that anything other than 0, 0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜