Skipping resize if the image already correct size

This commit is contained in:
The Random DIY
2025-08-17 12:08:51 +03:00
parent 2b3c7ea100
commit e2d0d3140b

View File

@@ -152,6 +152,13 @@ class Inkyimage:
logger.error("no height of width specified") logger.error("no height of width specified")
return return
current_width, current_height = self.image.size
# Skip if dimensions are the same
if width == current_width and height == current_height:
logger.info(f"Image already correct size ({width}x{height}), skipping resize")
return
image = self.image image = self.image
if width: if width: