|
imagecopyresized(PHP 4, PHP 5) imagecopyresized — Copy and resize part of an image Описание
bool imagecopyresized
( 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
)
imagecopyresized() copies a rectangular portion of one image to another image. dst_image is the destination image, src_image is the source image identifier. In other words, imagecopyresized() will take an rectangular area from src_image of width src_w and height src_h at position (src_x,src_y) and place it in a rectangular area of dst_image of width dst_w and height dst_h at position (dst_x,dst_y). If the source and destination coordinates and width and heights differ, appropriate stretching or shrinking of the image fragment will be performed. The coordinates refer to the upper left corner. This function can be used to copy regions within the same image (if dst_image is the same as src_image) but if the regions overlap the results will be unpredictable. Список параметров
Возвращаемые значенияВозвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки. Примеры
Пример #1 Resizing an image This example will display the image at half size.
<?php Результатом выполнения данного примера будет что-то подобное: The image will be output at half size, though better quality could be obtained using imagecopyresampled(). Примечания
Смотрите такжеimagecopyresampled() - Copy and resize part of an image with resampling |
|