resolving error caused by dpi of image on windows [temporary]

This commit is contained in:
vahidrezanezhad 2021-02-15 11:08:38 +01:00 committed by GitHub
parent c7d509bb2c
commit 37431d4840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -295,7 +295,11 @@ class eynollah:
def check_dpi(self): def check_dpi(self):
dpi = os.popen('identify -format "%x " ' + self.image_dir).read() dpi = os.popen('identify -format "%x " ' + self.image_dir).read()
return int(float(dpi)) try:
int_dpi = int(float(dpi))
except:
int_dpi = 300
return int_dpi
def resize_image_with_column_classifier(self, is_image_enhanced): def resize_image_with_column_classifier(self, is_image_enhanced):
dpi = self.check_dpi() dpi = self.check_dpi()