How do we mingle the photo color to background color?
How do we mingle the photo color to background color?
I saw this photo/
They have merged the photo color to sand color.
How to achieve this effect?
What is the general idea on this one?
They have merged the photo color to sand color.
How to achieve this effect?
What is the general idea on this one?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How do we mingle the photo color to background color?
Probably: the image of the people in the hearts is entirely black, with varying transparency. This is given a perspective distortion, then composed over the photo of the beach.
snibgo's IM pages: im.snibgo.com
Re: How do we mingle the photo color to background color?
Apart from transparency and perspective, how do they change the image color to sand color to match it?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How do we mingle the photo color to background color?
If a pixel that is black but 70% transparent is composed over a colour, the result will be a slightly dark version of that colour.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do we mingle the photo color to background color?
Perhaps you can provide your two input images (or representative examples) and some one can then process them and show you the command line for that. Also please always provide your version of IM and platform, since syntax can vary. See the very top post on the Users forum at viewtopic.php?f=1&t=9620
Re: How do we mingle the photo color to background color?
Hi Guys, I want to do something similar. I want to merge my text with a background image of beach sand. I am able to complete somewhat following:
Can someone help me to optimize it in php. Quality to achieve is bit.ly/1PFBRtS, which is created in Java.
Thanks
Vin
Can someone help me to optimize it in php. Quality to achieve is bit.ly/1PFBRtS, which is created in Java.
Thanks
Vin
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do we mingle the photo color to background color?
What is wrong with what you have done? Was it not in Imagemagick? If it was using Imagemagick, you can just put the command line into PHP exec() command.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line.
See viewtopic.php?f=1&t=9620
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line.
See viewtopic.php?f=1&t=9620
Re: How do we mingle the photo color to background color?
It is ImageMagik but quality it not as good as on : bit.ly/1PFBRtS . I am using WAMP 2.5 with ImageMagik 3.6 library.
I am using following lines of command:
$picin = new Imagick($inFile);
$picin->scaleimage(800,0);
$height = $picin->getimageheight();
$draw = new ImagickDraw();
$draw->setStrokeColor("#C59157");
$draw->setStrokeFill(1);
$draw->setFillColor('#8C6A45');
$draw->setFontSize(70);
$draw->setStrokeAntialias(false);
$picin->annotateImage($draw,40,$height-50,0,$text_in);
$picin->writeImage($outFile);
Is there any other functions or commands to improve the quality and make it like provide link.
Thanks,
Vinod
I am using following lines of command:
$picin = new Imagick($inFile);
$picin->scaleimage(800,0);
$height = $picin->getimageheight();
$draw = new ImagickDraw();
$draw->setStrokeColor("#C59157");
$draw->setStrokeFill(1);
$draw->setFillColor('#8C6A45');
$draw->setFontSize(70);
$draw->setStrokeAntialias(false);
$picin->annotateImage($draw,40,$height-50,0,$text_in);
$picin->writeImage($outFile);
Is there any other functions or commands to improve the quality and make it like provide link.
Thanks,
Vinod
Re: How do we mingle the photo color to background color?
You are not using Imagemagick directly but going through the Imagick API.
I would say you need to distort your text to make it look like it is flat on the sand and possibly make it slightly transparent to let some of the sand texture through. You might be able to do the transparency by using a rgba colour rather than hex ones.
I would say you need to distort your text to make it look like it is flat on the sand and possibly make it slightly transparent to let some of the sand texture through. You might be able to do the transparency by using a rgba colour rather than hex ones.
Re: How do we mingle the photo color to background color?
I did 30% colorize and changed to gray scalesnibgo wrote:If a pixel that is black but 70% transparent is composed over a colour, the result will be a slightly dark version of that colour.
photo.png was already changed to some perspective using photoshop
beach.png ( photo.png -colorspace Gray -colorize 30% ) -gravity center -compose over -composite result.png
Did not work as expected
Please advice
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do we mingle the photo color to background color?
If it is not working the way you want, then please explain what you want and why it is not working.
Please always provide your input images and not just the output saying it does not work.
try
Please always provide your input images and not just the output saying it does not work.
try
Code: Select all
convert beach.png ( photo.png -colorspace Gray ) -gravity center -compose multiply -composite result.png
Re: How do we mingle the photo color to background color?
Sir, i posted the result image in the first post. I just found it in some website.
I wanted to try the effect.
I don't know how to give you input images. I just wanted to make the image looks like it was drawn on the beach sand,
Multiply is giving good result.
I will post the code and images i used after changing the perspective.
Sir, you have any idea about perspective? Do we need to make different tries? Or is there any defined procedure for different distort perspective?
I wanted to try the effect.
I don't know how to give you input images. I just wanted to make the image looks like it was drawn on the beach sand,
Multiply is giving good result.
I will post the code and images i used after changing the perspective.
Sir, you have any idea about perspective? Do we need to make different tries? Or is there any defined procedure for different distort perspective?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do we mingle the photo color to background color?
See http://www.imagemagick.org/Usage/distorts/#perspective or on Unix system (Linux, Mac OSX or Windows with Cygwin) you can use my 3Drotate script.
You can upload your input image for your example the same way you provided the output images. All I am saying is if you have some result you created and it is not working the way you want, you should always provide both the input and output images along with your command line, so that others can test with the actual images and command. And also explain why it is not working the way you want, so we can understand what is the problem.I don't know how to give you input images. I just wanted to make the image looks like it was drawn on the beach sand,
Multiply is giving good result.