usnistgov / pyramidio

Image pyramid reader and writer
Other
33 stars 22 forks source link

are 32bit RGBA images supposed to work? #12

Open martyvona opened 4 years ago

martyvona commented 4 years ago

I don't think I understand the code here for the case (seemingly common, I would think) of a 32bit RGBA input image:

https://github.com/usnistgov/pyramidio/blob/1d5c802fa8641cfdd00cdea02f416ea350edd92b/pyramidio/src/main/java/gov/nist/isg/pyramidio/tools/ImageResizingHelper.java#L49

The resize32bbpImage() method seems to be hardcoded to assume that there is only one channel, not 4.

In practice this seems to be a bug, when using a 32bit RGBA input image we get wrong outputs.

avandecreme commented 4 years ago

From what I remember, I developed this function for 32bpp grayscale images indeed.