Skip to content
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
@dibenedetto

Description

@dibenedetto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    imageRelated to images

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions