Ejemplo n.º 1
0
imagedestroy($copy);
// 5 - Contrast filter where level in range (-100,100)
$copy = tulipIP::gdClone($image);
tulipIP::contrast($copy, -60);
tulipIP::saveImage($dest, $copy, $mime, 'Contrast-filter');
imagedestroy($copy);
// 6 - Colorize filter
$copy = tulipIP::gdClone($image);
$color = tulipIP::toRGB("#f00");
// resturn array(255,0,0)
tulipIP::colorize($copy, $color);
tulipIP::saveImage($dest, $copy, $mime, 'Colorize-filter');
imagedestroy($copy);
// 7 - Gamma Correction where correction level in range(0.01,4.99)
$copy = tulipIP::gdClone($image);
tulipIP::gamma($copy, 0.4);
tulipIP::saveImage($dest, $copy, $mime, 'Gamma-Correction');
imagedestroy($copy);
/**
 *  8 - Edge Filter
 * Imporatnt : This method require PHP to be compiled with the
 * =========== bundled version of the GD library.
 */
$copy = tulipIP::gdClone($image);
tulipIP::edge($copy);
tulipIP::saveImage($dest, $copy, $mime, 'Edge-filter');
imagedestroy($copy);
/*
 *  9 - Emboss Filter
 * Imporatnt : This method require PHP to be compiled with the
 * =========== bundled version of the GD library.