Trim/crop by alpha

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?".
snibgo
Posts: 11830
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo » 2018-10-23T09:59:28-07:00

What does "magick -version" say?
snibgo's IM pages: im.snibgo.com

WexOneOne
Posts: 11
Joined: 2018-10-22T14:01:44-07:00
Authentication code: 1152

Re: Trim/crop by alpha

Post by WexOneOne » 2018-10-23T10:21:50-07:00

magick -version
Version: ImageMagick 7.0.8-14 Q16 x86_64 2018-10-23 https://imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): jng jpeg png tiff x zlib

snibgo
Posts: 11830
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo » 2018-10-23T10:57:06-07:00

WexOneOne wrote:Delegates (built-in): jng jpeg png tiff x zlib
You have fewer delegates than before. You should install required delegate libraries such as openexr first, then install IM. IM's build process will find those delegates and incorporate them.

IM's build creates "config.log", which is useful to find what it has or hasn't incorporated.
snibgo's IM pages: im.snibgo.com

WexOneOne
Posts: 11
Joined: 2018-10-22T14:01:44-07:00
Authentication code: 1152

Re: Trim/crop by alpha

Post by WexOneOne » 2018-10-25T13:05:13-07:00

Hi,

So we compiled and installed OpenEXR than the new IM, all works, yay !

I got one more question, maybe there is a way to do it.

Can I give IM a number of inputs to trim in one command?
Something like:

Code: Select all

magick input1 input2 input3...  -trim +repage -gravity center -bordercolor none -border 10 output1 output2 output3....
Is there anything like that? If not, no biggi, right now I do a Python list comprehension on that process, it works, just thought maybe...

Thank you so much for all the help here, BTW.

snibgo
Posts: 11830
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo » 2018-10-25T13:18:34-07:00

That's what "magick mogrify" is for. See http://www.imagemagick.org/script/mogrify.php
snibgo's IM pages: im.snibgo.com

WexOneOne
Posts: 11
Joined: 2018-10-22T14:01:44-07:00
Authentication code: 1152

Re: Trim/crop by alpha

Post by WexOneOne » 2018-10-25T14:06:00-07:00

I'll take a look.

Thank you !

Post Reply