You are here


  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

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.

GIMP Version: 
Code License: 


I tried installing this plugin in my 64-bit GIMP 2.8.10 for Windows installation. It didn't seem to work. Instead, try using the Rotate tool in "Corrective" mode. In corrective mode, align the gridlines so they are at the same slant as the text you are trying to straighten. Then rotate it. It's not automatic, but it works...

The Deskew plugin for Windows can be downloaded from, or for the (justifiably) paranoid, a preview link:

See for some recent comments. He observes instability even in seemingly unrelated plugin calls when deskew is installed.

He found deskew at but that site has disappeared. Where is a good site to find Deskew (for various architectures)?

Those comments were dated 2012 February 4.


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))
(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.

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

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 :)

If you dont want to bother with extracting an rpm, an easier way is to download the 'deskew' plugin file from here:
.. and just copy it to /usr/lib/gimp/2.0/plug-ins

You saved my day Nathan.

I was looking for the plugin too and I found the the source rpm is available at Though I use Ubuntu I could simply extract the file gimp-deskew-plugin-1.1.tar.gz with file roller.

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

Hi, 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!

Nathan B


Subscribe to Comments for "Deskew"