Problem when opening PNG Image

Using the last Fiji 64 bits windows version,I tried to open a PNG 8bits gray image, but it is opened as a 3 channels (R,G,B) image, with an inverted LUT.
You can test this using the following image: https://bioimagingcore.be/owncloud/index.php/s/mOqWDToMg3Uyq2f

This is how it is opened:

Spot intensity value should be at 255 and background should be at 0, but Fiji invert the values and open it as a 3 artificial color channels image

Good day Benjamin,

plain ImageJ-1 opens your image as 8bit gray-value with inverted LUT. The latter means that the spots have the correct value 255 but are only displayed in black.

Regards

Herbie

Hi Herbie,

Thanks for testing, but this is not the case using Fiji, where should I report this bug ? I suspect a bug in Bioformat, which seems to be used instead of the javax.imageio.ImageIO class.

The same is true for Fiji, as long as you have Use SCIFIO when opening files (BETA!) unchecked in Edit > Options > ImageJ2.

@bpavie Can you check if this setting is enabled by chance on your system? (It should be disabled by default in a fresh Fiji installationā€¦)

Donā€™t worry, this forum is the perfect place to report and discuss issues like this :slight_smile:

1 Like

But the issue here - is it the inversion of the LUT and/or the fact it opens this 8-bit images as a 3-channel image?? Just curiousā€¦

@bpavie How exactly are you opening your image? Via File > Import > Bio-Formats - the image is no longer invertedā€¦ but still renders as a 3-channel image.

Youā€™re right indeed, the Use SCIFIO when opening files (BETA!) was checked (looks to be checked by default now).

@etadobson: If I drag and drop the image with the option Use SCIFIO when opening files (BETA!) checked, I got this issue.

Same using the following groovy code:
impSpot = IJ.openImage(Paths.get(dir.getAbsolutePath(), ā€˜spot-f.pngā€™).toString())

Using import bioformat give me the same result (with or without the option Use SCIFIO when opening files (BETA!) checked )

It could be a problem, because the same image could give 2 different ImagePlusā€¦

The data are the same in fact. The difference is that ImageJ1.x has some special-casing for png and jpeg images that checks if all three channels of an RGB color image are the same, and displays a single 8-bit image in this case.

1 Like

But the imagePlus is then different, with an inverted LUT and 3 channels in case it is openwith Bioformat shouldnā€™t it be more homogenized? In case you write a script (in my case), that give different result depending of if the user check this option.

I created an issue on the Fiji github: https://github.com/fiji/fiji/issues/168
I also added a video that demonstrate the issue.

2 Likes