Changing image color

insider

New Member
I have learnt \[code\]img_filter_colorize()\[/code\] of php little bit. I want to give user a option to choose color for an image. Example is hereMy code is: \[code\]<?phpheader('Content-type: image/png');$im = imagecreatefrompng('flower.png');imagefilter($im, IMG_FILTER_GRAYSCALE);imagefilter($im, IMG_FILTER_CONTRAST, 255);imagefilter($im, IMG_FILTER_NEGATE);imagefilter($im, IMG_FILTER_NEGATE);imagefilter($im, IMG_FILTER_COLORIZE, 255, 0, 0);imagepng($im, 'flower1.png');?>\[/code\]This code is creating a new image with red color but here I don't want to create an image, only display in screen.For example if user selects red button image changes to red and so on.Is this achievable?Is there any other way to do it (javascript, canvas or any other)?
 

Donna111

New Member
insider said:
I have learnt \[code\]img_filter_colorize()\[/code\] of php little bit. I want to give user a option to choose color for an image. Example is hereMy code is: \[code\]<?phpheader('Content-type: image/png');$im = imagecreatefrompng('flower.png');imagefilter($im, IMG_FILTER_GRAYSCALE);imagefilter($im, IMG_FILTER_CONTRAST, 255);imagefilter($im, IMG_FILTER_NEGATE);imagefilter($im, IMG_FILTER_NEGATE);imagefilter($im, IMG_FILTER_COLORIZE, 255, 0, 0);imagepng($im, 'flower1.png');?>\[/code\]This code is creating a new image with red color but here I don't want to create an image, only display in screen.For example if user selects red button image changes to red and so on.Is this achievable?Is there any other way to do it (javascript, canvas or any other)?
HI there
It's possible to change the image color.You can just add a .NET image color management & adjustment library add-on which enables to correct color settings, enhance color balance or recolor an image file in .NET developing applications. That would be easy for you.
 
Top