I have attach the image of tshirt, when i change the color of tshirt it is blinking.
code to change the color of tshirt is
exec("convert 01.png \( -clone 0 +level-colors black,yellow \) -draw 'color floodfill' tshirtnewt.gif")
please help me solving this problem.Thanks in advance
having problem in changing color of tshirt
-
- Posts: 38
- Joined: 2010-12-14T03:56:10-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: having problem in changing color of tshirt
Your command does not make sense to me. What is the -draw for? You have not even specified the color you want with -fill somecolor? How are you merging the original with the processed clone?exec("convert 01.png \( -clone 0 +level-colors black,yellow \) -draw 'color floodfill' tshirtnewt.gif")
However, this works fine for me on IM 6.6.8.6 Q16 Mac OSX Tiger.
convert 01.png -colorspace gray +level-colors black,yellow 01_yellow.gif
However, quality will be better with png as output, since it supports 8-bit transparency and gif only supports binary transparency.
convert 01.png -colorspace gray +level-colors black,yellow 01_yellow.png
Please note that PNG has been under quite a bit of development and you should upgrade to the latest release.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: having problem in changing color of tshirt
It flashed because you generated two images (second is from +clone) but you don't merge them.
As such you get a GIF animation!
Simplify
WARNING: PNG has anti-aliased pixels along the edge. GIF images only contains boolean transparency!!!
http://www.imagemagick.org/Usage/formats/#boolean_trans
As such you get a GIF animation!
Simplify
Code: Select all
convert 01.png +level-colors black,yellow shirt.gif
http://www.imagemagick.org/Usage/formats/#boolean_trans
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/