I think this is a hard task and I need your help.
Is it possible to reach the following effect with ImageMagick:

--------------------------------------------------------------------
to
--------------------------------------------------------------------

IM has to trim the white space not around the edges (this is easy), but INSIDE the document.
It has to recognize areas (width: 100%, height: variable, say minimum 5px) and trim them (like splice them out of the document).
Is this possible? THANKS IN ADVANCE.
Please tell me also, if this is NOT possible.