Hi,
I have 2 images one jpg and one png
and need the result jpg like this
Please help
Best regards.
combining png over jpg
Re: combining png over jpg
I tried using
composite -compose add -quality 100 -geometry 828x1260 text.png image.jpg new.jpg
the problem is the quality is very pour
composite -compose add -quality 100 -geometry 828x1260 text.png image.jpg new.jpg
the problem is the quality is very pour
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: combining png over jpg
Code: Select all
convert image.jpg ( -transparent white text.png ) -composite -quality 100 new.jpg
Re: combining png over jpg
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 ?el_supremo wrote:PeteCode: Select all
convert image.jpg ( -transparent white text.png ) -composite -quality 100 new.jpg
Please advise.
Best regards,
Claudiu.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: combining png over jpg
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: combining png over jpg
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: combining png over jpg
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.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 ?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/