Hello everyone!
I need to put one image (overlay 2748x820 px) on another (background 1000x1000 px). During this operation I want to change overlay size intentionally and preserve background's size change
So I try to use such line (Win 8.1, x64, command line):
magick convert background.jpg \( overlay.png -gravity center -resize 200 \) -composite result.jpg
but it changes both the size of overlay and backround images so that result image is 200x200 px while I want have result image 1000x1000 px (like background) and overlay image 200x60 px in the center of it.
is it possible? thanks for your help in advance
Convert and resize together
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert and resize together
You have \( \and \). Those escapes are needed for bash. They are not correct for Windows. Use just ( and ) .
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and resize together
Also for ImageMagick 7, use just magick and not magick convert. Other tools such as identify, mogrify, etc do need to be prefaced by magick, but not convert. When removing the \s, be sure to keep the space on each side of each parenthesis.
Re: Convert and resize together
on my PC it do nothing without 'magick'
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and resize together
You need magick, but not convert
Code: Select all
magick background.jpg ( overlay.png -gravity center -resize 200 ) -composite result.jpg