01-20-2013, 10:28 AM
This has been a big thing for me since I've recently gone over to digital scores. I've got lots of scanned PDFs, not all of which are in great shape, plus I wanted to crop any whitespace.
I searched around for ages, and though there are a few options, it seems the most promising solution is to use a combination of Imagemagick, a neat little program called Unpaper. The process isn't flawless, in fact it fails more often than not, as I've not spent the time to play with the parameters for unpaper, but when it does work, the improvement is remarkable.
I'll attach my bash script for the process. The workflow for using Unpaper is hinted at on its website. I extract the images from a PDF, unpaper and crop them, then glue them back together under a different filename.
Imagemagick's convert can be used for simple cropping, and includes a -fuzz option to deal with noisy images. I checked the license and it looks like it can be statically linked at no cost.
Re-reading the thread, I realise that the discussion is about a non-destructive crop. This is just a little food for thought then. Forgive me for going slightly off topic.
I searched around for ages, and though there are a few options, it seems the most promising solution is to use a combination of Imagemagick, a neat little program called Unpaper. The process isn't flawless, in fact it fails more often than not, as I've not spent the time to play with the parameters for unpaper, but when it does work, the improvement is remarkable.
I'll attach my bash script for the process. The workflow for using Unpaper is hinted at on its website. I extract the images from a PDF, unpaper and crop them, then glue them back together under a different filename.
Imagemagick's convert can be used for simple cropping, and includes a -fuzz option to deal with noisy images. I checked the license and it looks like it can be statically linked at no cost.
Re-reading the thread, I realise that the discussion is about a non-destructive crop. This is just a little food for thought then. Forgive me for going slightly off topic.