If knowledge is power, then sharing knowledge is ultimate powertrip
You are here: Home >> Tag Archives: GD Library

Tag Archives: GD Library

Feed Subscription

change image color using php

You can change image color using PHP GD library to sepia or b/w or grayscale. Here is the sample example. Change Color to Greyscale //to black and white if(!file_exists('dw-bw.png')) { $img = imagecreatefrompng('dw-manipulate-me.png'); imagefilter($img,IMG_FILTER_GRAYSCALE); imagepng($img,'db-bw.png'); imagedestroy($img); } Change Color to B/W //to negative if(!file_exists('dw-negative.png')) { $img = imagecreatefrompng('dw-manipulate-me.png'); imagefilter($img,IMG_FILTER_NEGATE); imagepng($img,'db-negative.png'); imagedestroy($img); } Change Color to Sepia //to black and white, ... Read More »

Scroll To Top