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?".
chaoscarnage
Posts: 93 Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789
Post
by chaoscarnage » 2016-11-02T16:48:52-07:00
Code: Select all
convert /var/images/cf4d0728852f660282decdb97290e9a199.png -composite /var/images/b1691d10038f45282924804a22204.png -crop +repage -resize 48x48 /var/images/59913038d72f297dfef26c3207.png
What I am trying to do:
Take this image, add this image to it, then crop and resize.
What it does now:
Takes the original image and saves it to the specified location. Does not composite or crop or resize.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2016-11-02T16:57:40-07:00
"-composite" needs two images before it.
"-crop" needs a geometry argument, eg 10x10+0+0.
chaoscarnage
Posts: 93 Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789
Post
by chaoscarnage » 2016-11-02T16:59:18-07:00
snibgo wrote: "-composite" needs two images before it.
"-crop" needs a geometry argument, eg 10x10+0+0.
Thank you, I meant to use Trim in this case. That should fix one issue. I will test and get back to you in a few moments.
chaoscarnage
Posts: 93 Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789
Post
by chaoscarnage » 2016-11-02T17:27:20-07:00
Okay, new question. Say I want to do 250 of these in a batch. Is there anyway to send them off to a server to have it done?
I know about
I was using that for a ton of images being compiled into one. However, I am unaware if there is a method for me to build the commands and build a bunch of images at once.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2016-11-02T18:07:00-07:00
"Send them off to a server to have it done?" I would think the cost (time) of the comms would far exceed just doing the work.
chaoscarnage wrote: ... to build the commands and build a bunch of images at once.
Sorry, I don't know what you mean. You can process in loops of course, but that isn't "at once".
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-11-02T18:58:15-07:00
You can use mogrify to do that on multiple images, if the overlay image is the same for all background images. See
http://www.imagemagick.org/Usage/basics ... fy_compose . If not, then you would have to write script loop.