How to get the Offset for content of the tranperent image

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?".
Post Reply
srijithc
Posts: 2
Joined: 2011-02-16T09:04:35-07:00
Authentication code: 8675308

How to get the Offset for content of the tranperent image

Post by srijithc »

Hi all,

I am having an transparent image and that image having image content at the right most corner of the image.

Is there any way to get the offset of the image content(Actual content of the image) by using Image Magick.

Please help me.

Thanks
Srijith C
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get the Offset for content of the tranperent imag

Post by fmw42 »

use -trim

convert image -trim result.png

convert result.png -format "%X,%Y" info:

or

identify -verbose result.png
and look at

Page Geometry
Origin Geometry

see
http://www.imagemagick.org/script/escape.php

http://www.imagemagick.org/Usage/crop/#trim
srijithc
Posts: 2
Joined: 2011-02-16T09:04:35-07:00
Authentication code: 8675308

Re: How to get the Offset for content of the tranperent imag

Post by srijithc »

Thank You.

Thanks
Srijith C
Post Reply