开发者

Changing the color of a part of image using PHP and Javascript

I am working on an application where what I exactly need to do is, to open an image, select some 开发者_运维百科part of it using javascript, selecting a color through a javascript color picker and then apply that color to the selected part of the image.

I am familiar with a few jquery plugins to select a part of the image and implementing a color picker (some javascript or jquery plugin) , however I am stucked in applying the color to the selected part of the image. I know this needs server side implementation,I am using php.

Please suggest.

Thanks in advance.


You will be only able to draw an object like line, circle, rectangle with fill colors and some transparency..

if that is like what you are looking for..

you can do that with php GD library, using php methods like drawcircle, with parameters for circle or rectangle coordinates, fill color, fill color's opacity (transparency).


Consider using something like Raphaël. You can do whatever you want on the client, then serialize the canvas data and post it back to the server or save it within the client.

Obviously, there are some limitations (IE being one of them).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜