Схема
public mixed
crop (
$top_x, $top_y, $bottom_x, $bottom_y )
Аргументы
Аргумент |
Возможный тип |
Описание |
$top_x |
— |
— |
$top_y |
— |
— |
$bottom_x |
— |
— |
$bottom_y |
— |
— |
Описание
Метод пока еще не документирован.
Исходный код
$image_old = $this->image;
$this->image = imagecreatetruecolor($bottom_x - $top_x, $bottom_y - $top_y);
imagecopy($this->image, $image_old, 0, 0, $top_x, $top_y, $this->info['width'], $this->info['height']);
imagedestroy($image_old);
$this->info['width'] = $bottom_x - $top_x;
$this->info['height'] = $bottom_y - $top_y;