Composite two images with different sizes without cropping. (solved)
Posted: 2016-03-22T01:45:29-07:00
Hello,
I'm using IM 6.9.3-6 on a Windows 10 X64 machine, using the command line.
I would like to add a watermark to the bottom right position of my image AND do a resize.
I did try and find a solution but so far none of the existing questions were giving the desired result.
What I've achieved so far is doing the resize:
This works perfectly, resizing the image based on the short side and saving it with the desired quality and strip the 'overhead' (metadata).
Now I would like to add a watermark to the bottom right of this image.
This watermark is a png with a fixed size of 380 x 87.
I found this command and tested it
It does add a watermark, but the size of target.jpg is now 380 x 87 (essentially cropping the rest of the souce image).
Somebody suggested to add -resize "1x1<" after the composite to disable resizing, but that did not work either.
So my first 'problem' is getting the composite to result in the 'source' image size.
Two other 'problems' I have to fix as wel are the location of the watermark (south is not bottom, right) and do both actions in one command.
Thanks in advance for your help!
Peter
I'm using IM 6.9.3-6 on a Windows 10 X64 machine, using the command line.
I would like to add a watermark to the bottom right position of my image AND do a resize.
I did try and find a solution but so far none of the existing questions were giving the desired result.
What I've achieved so far is doing the resize:
Code: Select all
convert source.jpg -resize "681^>" -quality 70% -strip target.jpg
Now I would like to add a watermark to the bottom right of this image.
This watermark is a png with a fixed size of 380 x 87.
I found this command and tested it
Code: Select all
composite -dissolve 25% -gravity south source.jpg wm.png target.jpg
Somebody suggested to add -resize "1x1<" after the composite to disable resizing, but that did not work either.
Code: Select all
composite -resize "1x1<" -dissolve 25% -gravity south source.jpg wm.png target.jpg
So my first 'problem' is getting the composite to result in the 'source' image size.
Two other 'problems' I have to fix as wel are the location of the watermark (south is not bottom, right) and do both actions in one command.
Thanks in advance for your help!
Peter