Page 1 of 1
combining png over jpg
Posted: 2008-07-22T03:41:14-07:00
by antitrust007
Hi,
I have 2 images one jpg and one png
and need the result jpg like this
Please help
Best regards.
Re: combining png over jpg
Posted: 2008-07-22T04:16:36-07:00
by antitrust007
I tried using
composite -compose add -quality 100 -geometry 828x1260 text.png image.jpg new.jpg
the problem is the quality is very pour
Re: combining png over jpg
Posted: 2008-07-22T08:30:27-07:00
by el_supremo
Code: Select all
convert image.jpg ( -transparent white text.png ) -composite -quality 100 new.jpg
Pete
Re: combining png over jpg
Posted: 2008-07-22T09:08:42-07:00
by antitrust007
el_supremo wrote:Code: Select all
convert image.jpg ( -transparent white text.png ) -composite -quality 100 new.jpg
Pete
Thank you for your reply , now new problems appear , if I fave white text in the text.png the text will not show , and the quality is pour , is there something to do about that ?
Please advise.
Best regards,
Claudiu.
Re: combining png over jpg
Posted: 2008-07-22T13:04:36-07:00
by el_supremo
I don't know how you could handle an image which has both black on white text and white on black text other than to do it in pieces.
As to the quality, the smaller text in text.png is not very good and I don't think ImageMagick can really do much to improve it. You might get a slightly better output image if you saved it as PNG.
Pete
Re: combining png over jpg
Posted: 2008-07-22T23:49:58-07:00
by anthony
If the background is white! DO NOT
ADD IMAGES.
Image adding is used for blending images, it is not used for merging images with white backgrounds...
You should be using
Multiply instead..
See
http://imagemagick.org/Usage/compose/#multiply
Also the last example in Image annotation!
http://imagemagick.org/Usage/annotating/#overlay
I also would NOT just set white to transparency. While it will work parts of the image that fall on top of each other will not merge as you would expect.
Re: combining png over jpg
Posted: 2008-07-22T23:52:15-07:00
by anthony
antitrust007 wrote:If I have white text in the text.png the text will not show , and the quality is pour , is there something to do about that ?
That will require you to some how specify what white parts are important, and what are not important. For that you may need to use a masking image of some type.