Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
tester
Posts: 2 Joined: 2019-09-30T10:52:39-07:00
Authentication code: 1152
Post
by tester » 2019-09-30T10:56:19-07:00
Hi!!
Having
https://upload.wikimedia.org/wikipedia/ ... go.svg.png
I would like to cut the lion but keep the original image size and lion in place.
right now i'm only able to cut the lion and keep the original image size, but not lion's position:
Code: Select all
convert /tmp/stratton.png -crop 550x800+320+30 -background none -extent 1200x1920 /tmp/output.png
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2019-09-30T12:43:13-07:00
I'm not sure what you want. After crop, the image has an offset in a canvas, so we can flatten to use that entire canvas if we want:
Code: Select all
magick 1200px-Stratton_Oakmont_logo_svg.png -crop 550x800+320+30 -background Blue -layers Flatten x.png
Is that what you want?
tester
Posts: 2 Joined: 2019-09-30T10:52:39-07:00
Authentication code: 1152
Post
by tester » 2019-09-30T23:04:46-07:00
Yes! That's exactly what i wanted!
I will have to read more about what layers does. ty!
This is my final code!
Code: Select all
convert /tmp/stratton.png -crop 550x800+320+30 -background none -layers Flatten /tmp/lion.png
convert /tmp/stratton.png -crop 250x800+320+300 -background none -layers Flatten /tmp/title.png
convert /tmp/lion.png /tmp/title.png -background none -layers Flatten /tmp/final.png