composite flag with image
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
composite flag with image
Hi,
I need to composite flag on face for create football fans.
I have some flag and when in use :
exec("convert face.jpg flag.jpg -compose Overlay -composite -quality 100 ".$result_image);
the result picture is not good in every case, for example if the flag has some color or shap result is better but with solid color, no.
in fact i need to create some picture like:
http://photofunia.com/categories/lab/football_fan
can you help me please?
( sorry for my bad en
I need to composite flag on face for create football fans.
I have some flag and when in use :
exec("convert face.jpg flag.jpg -compose Overlay -composite -quality 100 ".$result_image);
the result picture is not good in every case, for example if the flag has some color or shap result is better but with solid color, no.
in fact i need to create some picture like:
http://photofunia.com/categories/lab/football_fan
can you help me please?
( sorry for my bad en
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: composite flag with image
Upload your two input and output images to some free hosting service such as dropbox.com and put the URLs here. Then explain what is bad about the output result. Perhaps you need a different compose method.
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: composite flag with image
Hi again,
thank for reply
with png file and 50% transparency with photoshop and use the:
exec("composite multiply -gravity center -geometry +0+0 iran.png face.jpg -quality 100 result.jpg");
result is:
http://i59.tinypic.com/2jbw7jr.jpg
and with 100% transparency flag like:
http://i57.tinypic.com/2wqedyg.jpg
My result is:
http://i59.tinypic.com/10gcl6s.jpg
and photofunia is:
http://i58.tinypic.com/2d7xy7b.jpg
i use :
exec("convert face.jpg iran2.png -compose Overlay -composite -quality 100 result.jpg"); //Overlay
As you see, in my result with png and 50% transparency, i have a bad result, in case 2 and use the Overlay blend mode like photoshop my result is better but in photofunia result, the lips and face shown and red,white and green color is true and good for best result.
thank for reply
with png file and 50% transparency with photoshop and use the:
exec("composite multiply -gravity center -geometry +0+0 iran.png face.jpg -quality 100 result.jpg");
result is:
http://i59.tinypic.com/2jbw7jr.jpg
and with 100% transparency flag like:
http://i57.tinypic.com/2wqedyg.jpg
My result is:
http://i59.tinypic.com/10gcl6s.jpg
and photofunia is:
http://i58.tinypic.com/2d7xy7b.jpg
i use :
exec("convert face.jpg iran2.png -compose Overlay -composite -quality 100 result.jpg"); //Overlay
As you see, in my result with png and 50% transparency, i have a bad result, in case 2 and use the Overlay blend mode like photoshop my result is better but in photofunia result, the lips and face shown and red,white and green color is true and good for best result.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: composite flag with image
I need to have your two input images, so I can test myself. Also what version of IM are you using and what platform?
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: composite flag with image
Hi fred,
i need use every face and every flag with any color, like:
http://i.imgur.com/pduoc2Y.jpg
http://i.imgur.com/pt3pTa4.jpg
http://i.imgur.com/FUfstEv.jpg
http://i.imgur.com/ChYNTch.jpg
thank you
i need use every face and every flag with any color, like:
http://i.imgur.com/pduoc2Y.jpg
http://i.imgur.com/pt3pTa4.jpg
http://i.imgur.com/FUfstEv.jpg
http://i.imgur.com/ChYNTch.jpg
thank you
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: composite flag with image
try one of these and let us know if one of them is what you want. The first image is the face and the second in parens is the flag.
Code: Select all
convert FUfstEv.jpg \( ChYNTch.jpg -alpha set -channel a -evaluate set 50% +channel \) \
-gravity center -compose over -composite result1.jpg
Code: Select all
convert FUfstEv.jpg \( ChYNTch.jpg -alpha set -channel a -evaluate set 50% +channel \) \
-gravity center -compose overlay -composite result2.jpg
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: composite flag with image
They have either a mask to cut the image to the face shape and/or they have code to wrap the image texture onto the face. Sorry I cannot tell which it is. But the first thing would be to make a mask for the area of the face you want and use the mask. The mask should be antialiased around its edges so that it blends at the edges. The mask image would then be a third image placed just before -compose in the code above.
See masked blending at http://www.imagemagick.org/Usage/compose/#compose
Here is an example:
#mask was processing in a GIMP or Photoshop to draw a polygon about the face, then blurred (-blur 0x3) in ImageMagick
convert FUfstEv.jpg \( ChYNTch.jpg -resize 220% -alpha set -channel a -evaluate set 50% +channel \) \
-gravity center -geometry +0-30 mask4.png -compose over -composite result3.jpg
See masked blending at http://www.imagemagick.org/Usage/compose/#compose
Here is an example:
#mask was processing in a GIMP or Photoshop to draw a polygon about the face, then blurred (-blur 0x3) in ImageMagick
convert FUfstEv.jpg \( ChYNTch.jpg -resize 220% -alpha set -channel a -evaluate set 50% +channel \) \
-gravity center -geometry +0-30 mask4.png -compose over -composite result3.jpg
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: composite flag with image
Oh Yes,
I think about it and your answer is the best for me.
thank you so much.
I think about it and your answer is the best for me.
thank you so much.
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: composite flag with image
wow, it's true, thank you fred, you are good person.
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: composite flag with image
Ok,
the result is very good,
i try to add some texture as you told to my flag color with photoshop with overlay blend mode and is seem awesome.
thank you fred for your help.
best regards.
the result is very good,
i try to add some texture as you told to my flag color with photoshop with overlay blend mode and is seem awesome.
thank you fred for your help.
best regards.