comparison sat/tools/images.py @ 3157:8b4354b5c05f

tools (images): fixed type for recommended_size.
author Goffi <goffi@goffi.org>
date Wed, 05 Feb 2020 23:59:19 +0100
parents 559a625a236b
children 5c3bf37f2202
comparison
equal deleted inserted replaced
3156:0318802dfe28 3157:8b4354b5c05f
48 factor = max_size[0] / image.size[0] 48 factor = max_size[0] / image.size[0]
49 if image.size[1] * factor > max_size[1]: 49 if image.size[1] * factor > max_size[1]:
50 factor = max_size[1] / image.size[1] 50 factor = max_size[1] / image.size[1]
51 else: 51 else:
52 factor = max_size[1] / image.size[1] 52 factor = max_size[1] / image.size[1]
53 report['recommended_size'] = [image.width*factor, image.height*factor] 53 report['recommended_size'] = [int(image.width*factor), int(image.height*factor)]
54 else: 54 else:
55 report['too_large'] = False 55 report['too_large'] = False
56 56
57 return report 57 return report
58 58