Is there a framework which is able to remove the white space (rectangular) of an image. We create Image Thumbnails from technical drawings which are unfortunately in PDF format. We convert the PDF to SVG and then to JPG. Often the technical drawings are very small and now placed in the upper left corner of the thumbnail:
+---------+----------------------+
| | |
| (image) | |
| | |
+---------+ |
| |
| |
| |
| |
| (empty space) |
| |
| |
+--------------------------------+
So how can I easily remove the empty space and shrink the JPG file?