mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
DPI should be tuple of ints, not floats
This commit is contained in:
parent
ae0dfa8379
commit
3e6e50476b
|
@ -103,7 +103,7 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
file_info['pixels_per_meter'] = (i32(header_data[20:24]), i32(header_data[24:28]))
|
||||
file_info['colors'] = i32(header_data[28:32])
|
||||
file_info['palette_padding'] = 4
|
||||
self.info["dpi"] = tuple(map(lambda x: math.ceil(x / 39.3701), file_info['pixels_per_meter']))
|
||||
self.info["dpi"] = tuple(map(lambda x: int(math.ceil(x / 39.3701)), file_info['pixels_per_meter']))
|
||||
if file_info['compression'] == self.BITFIELDS:
|
||||
if len(header_data) >= 52:
|
||||
for idx, mask in enumerate(['r_mask', 'g_mask', 'b_mask', 'a_mask']):
|
||||
|
|
Loading…
Reference in New Issue
Block a user