[ome-users] BigTIFF OME-TIFFs do not meet the BigTIFF standard

Melissa Linkert melissa at glencoesoftware.com
Tue Nov 27 23:31:00 GMT 2012


Hi Matthias,

> I am using the Bio-Formats Java library to write OME-TIFFs with BigTIFF file format. I can open the images with Bio-Formats but it fails with libtiff. Libtiff throws the following error: "Not a TIFF file, bad BigTIFF offsetsize 0 (0x0)." I tested it with images generated by Bio-Formats 4.4.5 and trunk build.
> 
> I had a look at the BigTIFF format generated by Bio-Formats and encountered the following problem:
> The first eight bytes in the BigTIFF OME-TIFF file are: 77, 77, 0, 43, 0, 0, 0, 8
> Byte 0-3 are correct, but according to the BigTIFF specification [1], byte 4-5 should contain the number 8 and byte 6-7 should be zero.
> So, the first eight bytes should be: 77, 77, 0, 43, 0, 8, 0, 0
> 
> After I modified the BigTIFF OME-TIFF file, libtiff is able to open the file.
> May I ask you to have a look at this problem?

Thank you for reporting this.  Unfortunately, I have not been able to
reproduce the problem using either the 'bfconvert' command line tool or
this snippet of code:

// -- begin --
    ImageReader reader = new ImageReader();
    IMetadata meta = MetadataTools.createOMEXMLMetadata();
    reader.setMetadataStore(meta);
    reader.setId(inputFile);

    OMETiffWriter writer = new OMETiffWriter();
    writer.setBigTiff(true);
    writer.setMetadataRetrieve(meta);
    writer.setId(outputFile);

    for (int i=0; i<reader.getImageCount(); i++) {
      writer.saveBytes(i, reader.openBytes(i));
    }

    reader.close();
    writer.close();
// -- end --

Could you please send a small code example that demonstrates the problem?

Regards,
-Melissa

On Sun, Nov 25, 2012 at 01:35:39PM +0100, Matthias Baldauf wrote:
> Hello all,
> 
> I am using the Bio-Formats Java library to write OME-TIFFs with BigTIFF file format. I can open the images with Bio-Formats but it fails with libtiff. Libtiff throws the following error: "Not a TIFF file, bad BigTIFF offsetsize 0 (0x0)." I tested it with images generated by Bio-Formats 4.4.5 and trunk build.
> 
> I had a look at the BigTIFF format generated by Bio-Formats and encountered the following problem:
> The first eight bytes in the BigTIFF OME-TIFF file are: 77, 77, 0, 43, 0, 0, 0, 8
> Byte 0-3 are correct, but according to the BigTIFF specification [1], byte 4-5 should contain the number 8 and byte 6-7 should be zero.
> So, the first eight bytes should be: 77, 77, 0, 43, 0, 8, 0, 0
> 
> After I modified the BigTIFF OME-TIFF file, libtiff is able to open the file.
> May I ask you to have a look at this problem?
> 
> 
> Thank you very much in advance.
> 
> Regards,
> Matthias 
> 
> [1] http://www.awaresystems.be/imaging/tiff/bigtiff.html
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list