[ome-users] bfconvert query
Tjelvar Olsson (JIC)
Tjelvar.Olsson at jic.ac.uk
Wed Jun 24 09:02:14 BST 2015
Hi,
First of all I'd like to thank you for the "bfconvert" BioFormats tool. It makes my life so much easier.
However, it seems that in version 5.x it produces corrupted png files (I have tried it on versions 5.0.6 and 5.1.2).
The problem can be reproduced using the command below on your sample ome.tiff file.
$ bfconvert multi-channel-4D-series.ome.tif S%s_C%c_Z%z_T%t.png
If I try to open these png files using a simply Python script (attached). I get the error:
$ python open_png.py 5.1.2/S0_C0_Z0_T0.png
Traceback (most recent call last):
File "open_png.py", line 3, in <module>
im = Image.open(sys.argv[1])
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 2013, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file
Whereas if I doe the same with one of the images converted using bfconvert version 4.4.2 everything works fine.
Opening the files using an in-house tool that makes use of libpng gives some more descriptive feedback:
libpng warning: acTL: CRC error
Comparing the sizes of the files generated using version bfconvert 5.1.2 and 4.4.2 reveal that the former is smaller.
$ ls -l 5.1.2/S0_C0_Z0_T0.png
-rw-r--r-- 1 olssont olssont 2226 Jun 24 08:50 5.1.2/S0_C0_Z0_T0.png
$ ls -l 4.4.2/S0_C0_Z0_T0.png
-rw-r--r-- 1 olssont olssont 2238 Jun 24 08:30 4.4.2/S0_C0_Z0_T0.png
I have attached the sample converted png files.
Any ideas what is going on?
Cheers,
Tjelvar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150624/b5250356/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open_png.py
Type: text/x-python
Size: 80 bytes
Desc: open_png.py
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150624/b5250356/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4.4.2_S0_C0_Z0_T0.png
Type: image/png
Size: 2238 bytes
Desc: v4.4.2_S0_C0_Z0_T0.png
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150624/b5250356/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v5.1.2_S0_C0_Z0_T0.png
Type: image/png
Size: 2226 bytes
Desc: v5.1.2_S0_C0_Z0_T0.png
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150624/b5250356/attachment-0001.png>
More information about the ome-users
mailing list