I am using the following code.
$im = imagecreatefrompng('1.png');
imagefilter($im, IMG_FILTER_GRAYSCALE);
imagefilter($im, IMG_FILTER_CONTRAST, -40);
....
imagedestroy($im);
Now, I have to create the image again to apply different filter.
$im = imagecreatefrompng('1.png');
imagefilter($im, IMG_FILTER_GRAYSCALE);
imagefilter($im, IMG_FILTER_COLORIZE, 100,50,0);
....
imagedestroy($im);
Do i need to destroy and create that image every time to apply a new effect? Or can we use it by removing the previous filter?