phMagick color plugin

August 9, 2009 by nuno costa no comments

phMagick :: color functions

 

phMagick as a few color manipulation functions, see how they change this image

 

 

darken

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->darken(55);
?>

brigthen

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->brighten(55);
?>

grey scale

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->toGreyScale();
?>

invert colors

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->invertColors();
?>

sepia

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->sepia();
?>

auto levels

<?php
 $p = new phmagick('original.png', 'destination.png');
 $p->autoLevels();
?>

More from francodacosta.com

© francodacosta.com - All rights reserved