Hi,
i have a question related to the image composition.
I have a watermark.jpg with dimension 1649 × 100 pixels.
First I reduce it to 50%, so the new dimensions are 824 x 50 pixels; then I use it as watermark for other images.
There are two cases:
(i) An image A with width's dimension greater than 824:
there is no problem, the watermark is enterely displayed.
(ii) An image B with width's dimension lower than 824.
In this case I have a problem: the watermark is truncated.
Otherwise the image B should be enlarged (in width direction) in order to display the watermark.
Is possibile to achieve this goal? I try with some combinations of resize, but I can't be able ...
My command is like that:
convert image_A.jpg -resize 1181x1181\
\( watermark.png -resize 50%x50% \) -gravity South -geometry +0+80 -composite\
image_A_with_watermark.jpg
Thank you in advance,
Alessandro
Overlaid Watermark larger than overlaying image
-
- Posts: 2
- Joined: 2017-05-02T02:18:59-07:00
- Authentication code: 1151
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Overlaid Watermark larger than overlaying image
It can be done in a single command, but it's a bit messy.
Personally, I'd do it in a script:
1. Resize the image and get its dimensions.
2. Resize the watermark and get its dimensions. (But isn't this constant? So no need to repeat it?)
3. If the image is too narrow, stretch it.
4. Apply the watermark.
Personally, I'd do it in a script:
1. Resize the image and get its dimensions.
2. Resize the watermark and get its dimensions. (But isn't this constant? So no need to repeat it?)
3. If the image is too narrow, stretch it.
4. Apply the watermark.
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2017-05-02T02:18:59-07:00
- Authentication code: 1151
Re: Overlaid Watermark larger than overlaying image
Thank you very much for your suggestions.
Alessandro
Alessandro