Detecting multiple images in one image file

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?".
User avatar
Posts: 25546
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Detecting multiple images in one image file

Post by fmw42 » 2019-10-11T16:04:09-07:00

The listing from connected components when you use verbose=true in the define will show all the bounding boxes. So you just need to parse the output to get them. Once you have them, you can use -crop with those bounding boxes to extract each image one at a time. You will have to script these parts.

Post Reply