Bfconvert SVS to TIFF reopen bug

I’m trying to extract a TIFF from SVS and it seems I have experienced something resembling this one:
The input file:
The output file:

The command:
D:\bftools>bfconvert.bat -series 0 -bigtiff -compression LZW d:\tmp\3931.svs d:\tmp\bftools\3931.tif
SVSReader initializing d:\tmp\3931.svs
Reading IFDs
Populating metadata
Populating OME metadata
[Aperio SVS] -> d:\tmp\bftools\3931.tif [Tagged Image File Format]
Tile size = 240 x 240

  •    Converted 1/1 planes (100%)*

883.859s elapsed (142.0+882632.0ms per plane, 1075ms overhead)

The output file is corrupted:

What am I doing wrong?

Hi @darwinjob. Welcome to!

What version of Bio-Formats are you using? i.e. what does bfconvert.bat -version show?


Ops, sorry, I should provide this info in the first place.
Version: 6.1.0
Build date: 17 May 2019
VCS revision: a28a7cb6e7aa07862dc5a788720ff8032a51fd2e
Windows 7 64bit.

The same story is for MacOS (Mac Pro, latest OS).

PS. The output image is grayscale and the tiles seem to be rotated…

Hi @darwinjob, I tried converting the original image using the same command and it appears to open fine in FIJI. Do you only see the corruption in GIMP?

Does it display correctly if you use the showinf command line tool?

I can’t open this TIFF file anywhere else except GIMP. Our in-house image processing system (bio-formats based) displays the image correctly:

ImageMagick found no errors. So I guess the issue is GIMP-related.

The showinf output:

D:\bftools>showinf d:\tmp\bftools\3931.tif
Checking file format [Tagged Image File Format]
Initializing reader
TiffDelegateReader initializing d:\tmp\bftools\3931.tif
Reading IFDs
Populating metadata
Checking comment style
Populating OME metadata
Initialization took 0.062s

Reading core metadata
filename = d:\tmp\bftools\3931.tif
Series count = 1
Series #0 :
        Image count = 1
        RGB = true (3)
        Interleaved = false
        Indexed = false (false color)
        Width = 41888
        Height = 47388
        SizeZ = 1
        SizeT = 1
        SizeC = 3 (effectively 1)
        Tile size = 240 x 240
        Thumbnail size = 113 x 128
        Endianness = intel (little)
        Dimension order = XYCZT (certain)
        Pixel type = uint8
        Valid bits per pixel = 8
        Metadata complete = true
        Thumbnail series = false
        Plane #0 <=> Z 0, C 0, T 0

Reading pixel data (0-0)
Exception in thread "main" loci.formats.FormatException: Image plane too large.
Only 2GB of data can be extracted at one time. You can work around the problem b
y opening the plane in tiles; for further details, see: https://docs.openmicrosc
        at loci.formats.FormatReader.openBytes(
        at loci.formats.ImageReader.openBytes(
        at loci.formats.ReaderWrapper.openBytes(
        at loci.formats.gui.BufferedImageReader.openImage(BufferedImageReader.ja
Caused by: java.lang.IllegalArgumentException: Array size too large: 41888 x 473
88 x 3 x 1
        at loci.common.DataTools.safeMultiply32(
        at loci.common.DataTools.allocate(
        at loci.formats.FormatReader.openBytes(
        ... 6 more

I have no issue opening 3931.tif with GIMP 2.10 on Windows.

1 Like

Yes, GIMP 2.10.12 (2019-06-12) can open it flawlessly! Thanks for the confirmation :sunglasses:
Mine was 2.8 :face_with_hand_over_mouth: and apparently that’s the reason.

Thanks to all!