2011-03-07 42 views
0

我有这个大的PNG文件,现在我想创建一个左上角的缩略图。PHP:创建图片左上角的缩略图

png就像是600x1000像素,缩略图应该是左上角的400x300像素。

如果你能帮助我,那将会很棒! (因为谷歌只显示了如何缩略图整个画面)

回答

3
imagecopyresampled($top_left_image_thumb,  //cropped thumbnail image 
        $original_image,    //original image 
        0, 0, 0, 0,     //top-left corners 
        $thumb_width, $thumb_height, //dst dimensions 
        400, 300      //src subarea dimensions 
        );