galfar / deskew

Deskew is a command line tool for deskewing scanned text documents. It uses Hough transform to detect "text lines" in the image. As an output, you get an image rotated so that the lines are horizontal.
http://galfar.vevb.net/deskew
Mozilla Public License 2.0
164 stars 26 forks source link

Saving output file in unsupported format silently fails #20

Closed galfar closed 3 years ago

galfar commented 5 years ago

If you run something like this:

deskew -o lard in.png
deskew -o lard.pnz in.png

Deskew happilly reports it saved the output file but in fact the is no output. Saving silently fails if file format fails to be determined.

This is a problem in the underlying imaginglib but Deskew should explicitly check if the extension of given output file indicates one of the supported file formats.

galfar commented 5 years ago

With no output extension given, the format of the input may be used.