Page 1 of 1

image analysis / position and size of effectively used area

Posted: 2014-07-20T06:15:22-07:00
by OTATAA
hi,
I'm new to imagemagick and would like to aks the gurus on how to do the following:

- I have to determine left-x,top-y and the size (height and width) of the
effectively used area inside a bigger image.
- means this "effectively used area" has a rectangular shape.
- effectively used = non-transparent area (or area that is not white)

actually the "trim" function performs a cool job. but I need to have the position of this
trimmed portion inside the original image. I'm fine with reading these values out of
any imagemagick log.

does anybody have an idea?

best
stephen

Re: image analysis / position and size of effectively used a

Posted: 2014-07-20T06:21:25-07:00
by snibgo

Code: Select all

convert in.png -format %@ info:
This gives you the width, height, x-offset and y-offset that would result from a trim.

Re: image analysis / position and size of effectively used a

Posted: 2014-07-20T07:19:54-07:00
by OTATAA
cool. thanks to the guru!
stephen