Hi, I'm newbie with ImageMagik (version 6.3.8-q16):
I'm working with "Windows XP Command Line" and 2 images to compose a watermark (foto.jpg and logo.png)
I have 2 separate filters that works fine:
a) composite logo.png -resize 50% foto.jpg -compose Multiply -gravity southeast output.jpg
b) convert foto.jpg -mattecolor Tomato -frame 10x10+5+5 output.jpg
Basically I want to merge the 2 images for a watermark and add a border to the output image:
Filter a) make the watermarked image
Filter b) make bordered image
I'm trying to merge both filters in one command line but I dont know how. I have tried the use of parenthesis and arrays without success.
Any ideas ?
Concating 2 little filters in one line
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Concating 2 little filters in one line
Next time ask this in 'Users Forum' and read the 'before posting' topic.
Which does the following (line by line)...
Code: Select all
convert foto.jpg \
\( logo.png -resize 50% +clone +swap \
-gravity SouthEast -compose Multiply -composite \
-write output1.jpg +delete \) \
-mattecolor Tomato -frame 10x10+5+5 output2.jpg
- read first image
- start a new sequence, read and resize overlay, get copy of the first image, and swap there positions (background image first)
- set up gravity and composition and compose the to images
- write out that first result, then delete it before closing the now empty sub-sequence
- frame the original first image and write that as the final (second) result.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Concating 2 little filters in one line
This seemed to work for me, if I understand what you are trying:
convert lena.png \( logo: -resize 100x100! \) -gravity southeast \
-compose multiply -composite -mattecolor Tomato -frame 10x10+5+5 tmp.png
So I would think that the following would work for you:
convert foto.jpg \( logo: -resize 50% \) -gravity southeast \
-compose multiply -composite -mattecolor Tomato -frame 10x10+5+5 output.jpg
convert lena.png \( logo: -resize 100x100! \) -gravity southeast \
-compose multiply -composite -mattecolor Tomato -frame 10x10+5+5 tmp.png
So I would think that the following would work for you:
convert foto.jpg \( logo: -resize 50% \) -gravity southeast \
-compose multiply -composite -mattecolor Tomato -frame 10x10+5+5 output.jpg
Re: Concating 2 little filters in one line
Solved !!!
Thank you very much Anthony and Fmw42:
Anthony's solution generated 2 separated images but I need only 1 image as result.
Fmw42's post works fine copying and pasting next sentence in Windows' command line:
convert foto.jpg ( logo.png -resize 50% ) -gravity southeast -compose Multiply -composite -mattecolor Tomato -frame 10x10+5+5 output.jpg
Thank you very much Anthony and Fmw42:
Anthony's solution generated 2 separated images but I need only 1 image as result.
Fmw42's post works fine copying and pasting next sentence in Windows' command line:
convert foto.jpg ( logo.png -resize 50% ) -gravity southeast -compose Multiply -composite -mattecolor Tomato -frame 10x10+5+5 output.jpg