Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22233 программиста и 1048 роботов. Сейчас ищут 645 программистов ...
Приступая к работе

Imagick::trimImage - Remove edges from the image

Вернуться к: Imagick

Imagick::trimImage

(PECL imagick 2.0.0)

Imagick::trimImageRemove edges from the image

Описание

bool Imagick::trimImage ( float $fuzz )

Remove edges that are the background color from the image. Этот метод доступен, если Imagick был скомпилирован с версией ImageMagick 6.2.9 или старше.

Список параметров

fuzz

By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. This parameter represents the variation on the quantum range.

Возвращаемые значения

В случае успешной работы возвращает TRUE.

Ошибки

Вызывает ImagickException при ошибке.

Примеры

Пример #1 Using Imagick::trimImage():

Trim an image, then display to the browser.

<?php
/* Create the object and read the image in */
$im = new Imagick("image.jpg");

/* Trim the image. */
$im->trimImage(0);

/* Ouput the image */
header("Content-Type: image/" $im->getImageFormat());
echo 
$im;
?>

Смотрите также



Вернуться к: Imagick

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware