Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #3796

#3041 originally asked why PNGs were opened in I mode rather than I;16, and the response was

There's better support for image operations on int32 images than int16, especially for signed 16 bit images.

Nevertheless, #3796 was opened, and has received various comments.

The one I find compelling is #3041 (comment)

Pillow's TIFF and JPEG handlers, for example, will happily open 16-bit data without upcasting, so I don't see why the PNG handler can't do the same.

Looking through our test images, it is true that 12bit.cropped.tif is opened as I;16, 16bit.MM.cropped.tif is I;16B and 16bit.cropped.j2k is I;16. So some consistency would be good.

This PR changes PNG to open as I;16 rather than I.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PNG opens as I rather than I;16

2 participants