Amit Dhamu

Software Engineer

GD Image Filters

$image = imagecreatefrompng("demo.png");

// Black and White
imagefilter($image, IMG_FILTER_GRAYSCALE);
imagepng($image, "demo-blackandwhite.png");
imagedestroy($image);

// Negative
imagefilter($image, IMG_FILTER_NEGATE);
imagepng($image, "demo-negative.png");
imagedestroy($image);

// Sepia
imagefilter($image, IMG_FILTER_GRAYSCALE);
imagefilter($image, IMG_FILTER_COLORIZE,100,50,0);
imagepng($image, "demo-sepia.png");
imagedestroy($image);

 gd library / images / filters / php

Fixed Position on ScrolliOS and Android Detection

Show Comments

Made with by Amit Dhamu.
© MMXX. All rights reserved.