Skip to content

Commit 3b40247

Browse files
committed
mediafiles/get_media_preview(): fix float dimensions
1 parent c955e03 commit 3b40247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

motioneye/mediafiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ def get_media_preview(camera_config, path, media_type, width, height):
833833
logging.error('failed to open media preview image file: %s' % e)
834834
return None
835835

836-
width = width and int(width) or image.size[0]
837-
height = height and int(height) or image.size[1]
836+
width = width and int(float(width)) or image.size[0]
837+
height = height and int(float(height)) or image.size[1]
838838

839839
image.thumbnail((width, height), Image.LINEAR)
840840

0 commit comments

Comments
 (0)