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

Imagick::contrastImage - Change the contrast of the image

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

Imagick::contrastImage

(PECL imagick 2.0.0)

Imagick::contrastImageChange the contrast of the image

Описание

bool Imagick::contrastImage ( bool $sharpen )

Enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced.

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

sharpen

The sharpen value

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

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

Ошибки

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

Примеры

Пример #1 Imagick::contrastImage()

<?php
function contrastImage($imagePath$contrastType) {
    
$imagick = new \Imagick(realpath($imagePath));
    if (
$contrastType != 2) {
        
$imagick->contrastImage($contrastType);
    }

    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>



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

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