Bfconvert SVS to TIFF reopen bug

Hi
I’m trying to extract a TIFF from SVS and it seems I have experienced something resembling this one:
https://www.openmicroscopy.org/community/viewtopic.php?f=13&t=8042
The input file:
http://folk.uio.no/dmitrd/bio-formats/3931.svs
The output file:


The command:
D:\bftools>bfconvert.bat -series 0 -bigtiff -compression LZW d:\tmp\3931.svs d:\tmp\bftools\3931.tif
d:\tmp\3931.svs
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%)*
    

[done]
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 image.sc!

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

~J

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?

Hi
I can’t open this TIFF file anywhere else except GIMP. Our in-house image processing system (bio-formats based) displays the image correctly: http://cmbn-navigator.uio.no/navigator/openseadragon/index.html?id=83285

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
opy.org/bio-formats/6.1.0/about/bug-reporting.html#common-issues-to-check
        at loci.formats.FormatReader.openBytes(FormatReader.java:872)
        at loci.formats.ImageReader.openBytes(ImageReader.java:445)
        at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
        at loci.formats.gui.BufferedImageReader.openImage(BufferedImageReader.ja
va:86)
        at loci.formats.tools.ImageInfo.readPixels(ImageInfo.java:821)
        at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:1055)
        at loci.formats.tools.ImageInfo.main(ImageInfo.java:1121)
Caused by: java.lang.IllegalArgumentException: Array size too large: 41888 x 473
88 x 3 x 1
        at loci.common.DataTools.safeMultiply32(DataTools.java:1286)
        at loci.common.DataTools.allocate(DataTools.java:1259)
        at loci.formats.FormatReader.openBytes(FormatReader.java:869)
        ... 6 more
D:\bftools>

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!