This repository was archived by the owner on Sep 18, 2024. It is now read-only.
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
Images with bit depth > 8 (depth sensor or medical images) #239
Closed
Description
grayscale images with bit depth > 8 (think about depth sensor or medical images) are automatically converted to 8 bit instead of keeping the most adequate representation:
if
color_mode == 'grayscale':
if img.mode != 'L':
img = img.convert('L')`
PIL images with mode == 'I' (capital i) are actually 32bit integer images, and should not be shrinked down to 8 bit, thus keeping all the information.