Page 5 of 5
Re: putting tile on image background is also changing need h
Posted: 2014-04-15T22:37:00-07:00
by bijalbhavsar99
Hi fmw42,
I am facing one issue with slight curve in shoulder part of body.
I have tried below code to achieve it.
Code: Select all
exec("convert pattern.png \
\( mainbody_clone.png -blur '0x3' -auto-level \) -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args '2x-20' -composite displace_body.png ");
exec("convert displace_body.png mainbody_clone.png -compose multiply -composite final_body.png");
But couldn't achieve it.
This is output of my image
http://oi61.tinypic.com/5v3urd.jpg
I and looking for
http://oi60.tinypic.com/1195l6g.jpg
Thank You for help
Re: putting tile on image background is also changing need h
Posted: 2014-04-15T22:51:38-07:00
by fmw42
I cannot test your code without all the input images.
You probably need to manual shade the shoulders in your white shirt body image to achieve such fine tuning.
You did not copy the code correctly from earlier in the post. It should be -20x-20 (not 2x-20) for the displace argument:
Code: Select all
convert body.png -background black -alpha background 2body.png
convert fabric.png \
\( 2body.png -blur "0x3" -auto-level \) -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args "-20x-20" -composite 2displace_body.png
convert 2displace_body.png 2body.png -compose multiply -composite 2body_displace_composite.png
Re: putting tile on image background is also changing need h
Posted: 2014-04-15T22:59:54-07:00
by bijalbhavsar99
HI
Thank you for replay
my pattern image
http://oi59.tinypic.com/15q4vhx.jpg
my clone image
http://oi60.tinypic.com/2llf5oo.jpg
Output image
http://oi60.tinypic.com/2iasdy1.jpg
yes i check this code also but not luck
http://oi60.tinypic.com/2zi0nq0.jpg
Code: Select all
convert body.png -background black -alpha background 2body.png
convert fabric.png \
\( 2body.png -blur "0x3" -auto-level \) -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args "-20x-20" -composite 2displace_body.png
convert 2displace_body.png 2body.png -compose multiply -composite 2body_displace_composite.png
Thanks
Re: putting tile on image background is also changing need h
Posted: 2014-04-16T10:10:14-07:00
by fmw42
try this and adjust the blur and displacement arguments as desired
Code: Select all
convert mainbody_clone.png -background black -alpha background mainbody_clone2.png
convert pattern.png \
\( mainbody_clone2.png -alpha off -blur 0x3 -alpha on -auto-level \) -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args "-10x-10" -composite 2displace_body.png
convert 2displace_body.png mainbody_clone.png -compose multiply -composite result1.png
or just blur the shoulders and above
Code: Select all
convert mainbody_clone.png -background black -alpha background mainbody_clone2.png
convert -respect-parenthesis pattern.png mainbody_clone2.png \
\( -clone 1 -alpha off -blur 0x3 -alpha on -gravity north -crop 440x125+0+0 +repage \
-clone 1 -gravity south -crop 440x475+0+0 +repage -append -auto-level \) \
-delete 1 -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args "-10x-10" -composite 2displace_body.png
convert 2displace_body.png mainbody_clone.png -compose multiply -composite result2.png
Re: putting tile on image background is also changing need h
Posted: 2014-04-17T01:45:04-07:00
by bijalbhavsar99
Hi
Thank you so much its work i change displace parameter as per your suggestion
convert mainbody_clone.png -background black -alpha background mainbody_clone2.png
convert -respect-parenthesis pattern.png mainbody_clone2.png \
\( -clone 1 -alpha off -blur 0x3 -alpha on -gravity north -crop 440x125+0+0 +repage \
-clone 1 -gravity south -crop 440x475+0+0 +repage -append -auto-level \) \
-delete 1 -alpha set -virtual-pixel transparent \
-compose displace -set option:compose:args "5x5" -composite 2displace_body.png
convert 2displace_body.png mainbody_clone.png -compose multiply -composite result2.png
Thanks for help.