Bioformats and .lif files

I am unable to upload my .lif files here, but I am running into a problem where the color channels are not being imported properly from a color image into imageJ using bioformats. I wrote some simple code to combine the colors in the reverse order that worked for awhile, but now it seems almost to import the color channels at random. Help please!

  • Upload an original image file here directly or share via a link to a file-sharing site (such as Dropbox) – (make sure however that you are allowed to share the image data publicly under the conditions of this forum).
  • Share a minimal working example of your macro code.


  • What is the image about? Provide some background and/or a description of the image. Try to avoid field-specific “jargon”.

Analysis goals

  • What information are you interested in getting from this image?


  • What stops you from proceeding?
  • What have you tried already?
  • Have you found any related forum topics? If so, cross-link them.
  • What software packages and/or plugins have you tried?

You may want to host your files elsewhere and post a link, so that others can try and reproduce the issue and look at the metadata. For example Google Drive with a disposable/temporary account.

Here is a link to some sample files. At first I thought it was just the way the .lif files were being collected RGB vs BGR but now even if they are all collected exactly the same way on the same day, I’m having issues with opening and merging:

1 Like

Thanks, perhaps @dgault or someone related to BioFormats will be able to help you. Unfortunately I am blocked from Dropbox at work (and Google Drive and…) so won’t be able to directly test right now.

Also, to clarify, when you say “at random,” are you able to open the same image multiple times and get different results? Or will the same image always open in the same way, but two images collected at about the same time will open with the channels in different orders?

Hi @DrShankman
I have imported one of the lif files into our OMERO server. It uses Bio-Formats to read the data. See screenshot below
Is it what you are expecting?



1 Like

They should look like this:

1 Like

I apologize, the same file will always have the same encoding (if channel 0 is red, it will always be red when opened), but in the same file, images acquired on the same day will occasionally have a mixture of RGB vs BGR ?interlacing?

1 Like

Please see below for an example of what the images should look like

Just a note : this lif file seems to use 16 bit RGB images. This is not so standard and could be the cause of the trouble.

1 Like

Just coming back to take a look at this now after the holidays. I have opened a Bio-Formats GitHub Issue to track this bug (LIF: Incorrect channel colours · Issue #3655 · ome/bioformats · GitHub), so far I have tried testing a few quick fixes but have not yet been able to resolve the issue.

1 Like