Deskew

Deskew, also called auto straighten, is the automatic rotation of an image such that the text is vertically aligned. This is great for cleaning up scanned documents.

http://www.cubewano.org/gimp-deskew-plugin/

0
Average: 4.5 (2 votes)

Comments

Running deskew plugin in batch mode

Hello,

If you want to execute the deskew plugin on many pages, it's useful to use scripts.
Open a simple text editor, and put the following text:

(define (batch-deskew pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let*
(
(filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-deskew-plugin 0 image drawable 0 0 0 0 0)
(gimp-layer-flatten drawable)

(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image)

)
(set! filelist (cdr filelist))
)
)
)

Then save the text as 'batch-deskew.scm' in the folder GIMP-2.0\share\gimp\2.0\scripts (this is the folder for the windows version, it may be different on others OS). Then run GIMP and launch the console (menu Filter->Script-Fu-> Console). Enter the following command : (batch-deskew "*.FileExtension") . The deskew plugin will be executed for all images with 'FileExtension' extension in the default image directory of the OS. For example, if i want to execute the plugin on bmp files, i enter (batch-deskew "*.bmp"). On Vista it will run on the \Images folder of the current user.

I am only a beginner with Gimp scripts. It should be possible to specify another folder than \Images when running the script, but i didn't test it.

New repo for deskew plug-in

Since the original website still doesn't work, I went ahead and put the code with some changes here:

https://github.com/prokoudine/gimp-deskew-plugin

The plug-in needs some more fixing, I'll try to do what I can. Feel free to send git formatted patches or pull requests :)

get the plugin from here

If you dont want to bother with extracting an rpm, an easier way is to download the 'deskew' plugin file from here: https://docs.google.com/leaf?id=0B_kEFWyVsTF-NTc1Mzg3NWEtMzRhYS00ZGRiLWE...
.. and just copy it to /usr/lib/gimp/2.0/plug-ins

Thanks

You saved my day Nathan.

alternative source

I was looking for the plugin too and I found the the source rpm is available at http://ccux-linux.de/pdb/index.php?pdetail=6271. Though I use Ubuntu I could simply extract the file gimp-deskew-plugin-1.1.tar.gz with file roller.

awesome!

Thanks so much for that, saved me a lot of anxiety!!

Site is down.

Hi,

http://www.cubewano.org/gimp-deskew-plugin/ is down.

I have emailed the person who created the plugin, but am not sure if I will have any luck with that.
Would anyone be able to forward me a copy of their 'gimp-deskew-plugin', or point me to an alternative download site? I would REALLY appreciate it!

Thanks,
Nathan B

Cannot install Deskew plugin

Very pity. With Ubuntu 9.10 64 bits no possiblities to install the plugin.

Works great! Thank

Works great!
Thank you.
Gerard.

Syndicate content