Bfconvert throwing an error for an *.vsi file

Sample image and/or macro code

  • Upload an original image file here directly or share via a link to a file-sharing site (such as Dropbox).
  • Share a minimal working example of your macro code.

(If this is your first post, you may not be able to attach images, in which case make a post with a link or a first post without the image attachment and a second one with)


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

Converting to bigtiff by running :

bfconvert -noflat -overwrite -bigtiff ID01_Wk7d3_1D_Section01.vsi ID01_Wk7d3_1D_Section01.ome.tif

throws the error:

Series 0: converted 1/1 planes (100%)
Exception in thread “main” loci.formats.FormatException: Buffer is too small; expected 560640 bytes, got 249318 bytes.
at loci.formats.FormatWriter.checkParams(
at loci.formats.out.TiffWriter.saveBytes(
at loci.formats.out.OMETiffWriter.saveBytes(
at loci.formats.out.OMETiffWriter.saveBytes(
at loci.formats.FormatWriter.saveBytes(
at loci.formats.ImageWriter.saveBytes(

Analysis goals

  • What information are you interested in getting from this image?
    Getting an ome.tif file


  • What stops you from proceeding?
    The exception thrown

  • What have you tried already?
    The command bfconvert as mentioned above

  • Have you found any related forum topics? If so, cross-link them.

  • What software packages and/or plugins have you tried?

bfconvert -version
Version: 6.4.0
Build date: 11 March 2020
Blockquote (314.3 KB)

Hi @serban,

welcome to the forum and thanks for your clear and detailed bug report. I was able to reproduce the issue successfully and tracked the origin of the bug which was introduced in Bio-Formats 6.4.0.

I have opened a Pull Request to address this regression and hope to have it released in an upcoming patch release of Bio-Formats. In the meantime, a workaround would be to use Bio-Formats 6.3.1 which should convert your sample file without issue.


Hi Sebastien,

I tested with 6.3.1 and it was working.
However, I tried it also with the latest 6.5.0 (released yesterday) and the error is still present there.



Hi Serban.

yes the fix has been opened too late for inclusion into the Bio-Formats 6.5.0 release so the error persistence is expected. The next Bio-Formats release, either 6.5.1 or 6.6.0, should fix the regression.