ScanTailor Fix DPI dialog

 Posted by:   Posted on:   Updated on:  2023-01-07T21:20:14Z

ScanTailor is a great tool to optimize scanned documents and books. Sometimes it won't load images unless the DPI is correct. See how to set the DPI parameter in ScanTailor and what processing you can do to get it right.

ScanTailor is a scan post-processing software that can improve significantly your scans and reduce the file size of your e-books. But it needs high quality scanned images above a threshold considered by it 300 DPI. The purpose of this post is to understand the Fix DPI dialog in ScanTailor. If you don't see it when loading images everything should be OK and you can continue processing.

ScanTailor Fix DPI dialog screenshot
The Fix DPI dialog

Most users, when seeing this dialog choose the lowest available resolution of 300 x 300 DPI. This is wrong! Most of the times, the result will be a downsampled image with low quality.

The dialog is actually ScanTailor's way to tell you that you didn't make the scan correctly. For good results you should scan at 300 DPI. If you are sure you set your scanner to 300 DPI and you still see this dialog, there may be a problem with the image metadata. If you saved the images as JPG this is normal and you can choose 300 x 300 DPI without any problem and continue.

Aren't sure about the real DPI of the image? You can determine it. If you have an A4 scanner most probably you scanned an A4 page, so the vertical size should be 297 mm. At 300 DPI, this means 300 x 297 / 25.4 = 3508 pixels vertical size of the image. Now check some scanned images and if their vertical size is OK (no more than 10 - 20 pixels variation) you can continue in ScanTailor with 300 DPI.

Otherwise you need to determine the real DPI. In my case it is 144 as reported by ScanTailor, because the images are saved as TIFF and DPI value is stored. Assuming all scanned pages have the same size, we'll choose one image. We will open it in XnViewMP and we will select using the crop rectangle a page (sheet of paper) without margins (not text margins). There's no need to actually crop the image because the selection dimensions are displayed and that's what we need.

XnViewMP selection DPI information screenshot
Selection size
In my example, the selection is 755 by 1130 pixels. But I know the real page is 16 by 20 cm. So I can calculate the DPI: 1130 / (20 / 2.54) = 143.51 DPI, correctly read by ScanTailor as 144.

But 144 DPI is quite small for a high quality document. There are two possibilities: either redo the scan at a greater DPI or try to get this image at 300 DPI by resizing it. Obviously the first method is much better. But when that's not possible we can try the second one and still get good results. If the DPI is lower than 140, this and further post-processing is not recommended because it will produce bad results.

So my image is 144 DPI and I must get it to 300 DPI. There are two ways of doing this with XnViewMP. Suppose we have multiple images with the same issue and we want them all fixed, we will browse using XnViewMP to the folder containing them, select all images and press Ctrl+U or go to Tools - Batch convert. In the following dialog, check that the files were added to queue and go to Actions tab. Press Add action and from Image add Set DPI. Put 300 at X and Y and check Keep print size. Press Convert and wait to get your converted images. This was the first method and it doesn't offer the best results.

That's why I recommend using the following actions to resize images:
  • Image - Resize. Choose percent and calculate the value like this: (300 / 144) x 100 = 208 in my case. And most important, choose Lanczos at Resample.
  • Image - Set DPI. Still 300 but don't check Keep print size!
This is how it looks:

XnViewMP batch convert dialog screenshot
Resize settings
Now, your scanned pages are ready for ScanTailor.

No comments :