Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Posted by MRivers on
URL: http://imagej.273.s1.nabble.com/Bug-when-reading-RGB-TIFF-files-with-ROWSPERSTRIP-1-tp5020468p5020473.html

Herbie wrote:

Good day Mark,

your sample image "test_rgb2_001.tif" opens correctly when using BioFormats.

It is not a conventional RGB-image but an image showing two color
channels (blue is empty).

BioFormats setting:

View stack with: Hyperstack
Color mode:      Default

After the import you can get an RGB image by:

"Image >> Colors >> Channels Tool... >> More >> Convert to RGB"

HTH

Herbie

I am not sure what BioFormats is?  Is this an ImageJ plugin?

I don't agree that blue is empty in these files.  I have made a new file in the same directory as my previous image, test_rgb2_002.tif.  In this image the red, green, and blue planes all have the same value, so it should display in grey.   Indeed it does display in grey when using ImageMagick on Linux, or Photos or Paint on Windows.  I have attached a PNG file screen shot of the ImageMagick display of this file.  Note that it is grey.  I have also attached the ImageJ display screen shot.  Note that it is not grey, and in fact clearly contains red, green, and blue colors but is not displaying the file correctly.

I maintain my file is a perfectly valid RGB file.  It has separate color planes.  Rather than having the more conventional 1024 rows/strip for plane interleave has 1 row/strip.  Other applications read this file correctly, but ImageJ does not.

Thanks,
Mark



From: Mark Rivers
Sent: Sunday, April 15, 2018 10:33 AM
To: [hidden email]
Subject: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Folks,

I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.

These files are displayed correctly in other applications, including:

-          Microsoft Photos, Paint (Windows 10)

-          IDL (8.5.1)

-          ImageMagick "display" utility on Linux (6.7.8-9)

This is the output of the Linux tiffinfo command on the file:
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I have attached 2 PNG files.

rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.

I have not attached the test file because it is quite large.  However, it can be found here:

http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif

That directory also contains 2 other test files.

test_rgb1_001.tif
This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: single image plane
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

test_rgb3_001.tif
This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.

Thanks,
Mark Rivers



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

rgb2_002.png (34K) Download Attachment
rgb2_002ImageMagick.png (10K) Download Attachment