mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
parent
3da9d5d869
commit
0a0694e095
@ -29,14 +29,16 @@ class File(PhotoBase):
|
|||||||
def _plat_get_blocks(self, block_count_per_side, orientation):
|
def _plat_get_blocks(self, block_count_per_side, orientation):
|
||||||
image = QImage(str(self.path))
|
image = QImage(str(self.path))
|
||||||
image = image.convertToFormat(QImage.Format_RGB888)
|
image = image.convertToFormat(QImage.Format_RGB888)
|
||||||
if type(orientation) == str:
|
if type(orientation) != int:
|
||||||
logging.warning("Orientation for file '%s' was a str '%s', not an int.", str(self.path), orientation)
|
logging.warning(
|
||||||
|
"Orientation for file '%s' was a %s '%s', not an int.", str(self.path), type(orientation), orientation
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
orientation = int(orientation)
|
orientation = int(orientation)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
"Skipping transformation because could not \
|
"Skipping transformation because could not convert %s to int. %s",
|
||||||
convert str to int. %s",
|
type(orientation),
|
||||||
e,
|
e,
|
||||||
)
|
)
|
||||||
return getblocks(image, block_count_per_side)
|
return getblocks(image, block_count_per_side)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user