Issues converting CZI files to TIFF

I am using the bioformats command line interface on Ubuntu (16.04) and I am encountering issues converting CZI images to TIFFs.

I can perform the conversion well enough using the following command: bfconvert -compression LZW -separate -series 0 -channel 0 $czi_fn $tiff_fn to extract the first channel of the first scene of a CZI file. The issue is that the files are massive, nearly 20x bigger than when converted via imageJ and other software.

When using bioformats on windows I will recieve a 25MB tiff file, the expected size. When using the command line interface I get a 456MB file. This 456MB file, when opened in image processing software like GIMP and exported as tiff, is properly compressed to 25MB.

Has anyone else experienced this massive inflation of tiff files? Any suggested solutions? When I convert the czi -> tiff and disable LZW compression the files become well over a GB which is ridiculous.

You CZI files might be compressed internally in Zen using JPGXR (really useful feature)and will be automatically unpacked during the conversion via Bioformats.

What system are you using? AxioScan?

2 Likes

Yes these files are raw from an AxioScanner. My end goal is to extract each channel of each scene from my AxioScan CZI files, but the command line’s output files are just so much larger than they should be. Looking into this a bit more, it appears the bioformats converter exports the CZI as “tiled tiff” files. When these tiled tiff files are converted into to regular, LZW compressed tiff files they behave normally and are an expected size. Do you know if the command line bioformats converter allows for converting to non-tiled tiffs?

Thanks in advance.

No, i do not know this but I would look at the examples from here:

https://docs.openmicroscopy.org/bio-formats/6.2.0/users/comlinetools/conversion.html

Why do you need tiled tiff files?

Hi @mousebrainatlas,
If you could upload a sample file to https://www.openmicroscopy.org/qa2/qa/upload/ we can try to replicate the issues you are seeing and suggest/find a fix.

Many thanks,

Will.