mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-12 21:59:56 +02:00
Merge branch 'ocrd-cli' of github.com:qurator-spk/eynollah into ocrd-cli
This commit is contained in:
commit
ba561ec833
1 changed files with 2 additions and 1 deletions
|
@ -18,9 +18,10 @@ def check_dpi(image_filename):
|
|||
try:
|
||||
exif = OcrdExif(Image.open(image_filename))
|
||||
resolution = exif.resolution
|
||||
if resolution == 1:
|
||||
raise Exception()
|
||||
if exif.resolutionUnit == 'cm':
|
||||
resolution /= 2.54
|
||||
return int(resolution)
|
||||
except:
|
||||
return 230
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue