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: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo »

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 »

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: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo »

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 »

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: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trim/crop by alpha

Post by snibgo »

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 »

I'll take a look.

Thank you !
Post Reply