I have an image of an irregular black object on a white background. I make background transparent using IMagemagick command.
Now I want to know the maximum width and maximum height of the black object on the image in pixels . Are there any quick ways to get this information.
Thanks in advance
width and height of non transparent part of image
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: width and height of non transparent part of image
-trim the image then use -verbose info: or an identify to output the size and location of the 'crop' the trim performed.
See IM Examples Trim
http://www.imagemagick.org/Usage/crop/#trim
See IM Examples Trim
http://www.imagemagick.org/Usage/crop/#trim
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/