Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent read truncation in master vs 0.12 #16

Open
tdsmith opened this issue Jul 2, 2016 · 1 comment
Open

Apparent read truncation in master vs 0.12 #16

tdsmith opened this issue Jul 2, 2016 · 1 comment

Comments

@tdsmith
Copy link

tdsmith commented Jul 2, 2016

With source image https://downloads.openmicroscopy.org/images/OME-TIFF/2016-06/bioformats-artificial/single-channel.ome.tif, these give different output on Ubuntu Xenial with zzuf from master and libtiff-tools from Xenial:

ubuntu@ubuntu-xenial:~$ zzuf -O null tiffinfo corpus/single-channel.ome.tif 
TIFF Directory at offset 0x8 (8)
  Image Width: 439 Image Length: 167
  Resolution: 0, 0 pixels/cm
  Bits/Sample: 8
  Sample Format: signed integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  ImageDescription: <?xml version="1.0" encoding="UTF-8"?><!-- Warning: this comment is an OME-XML metadata block, which contains crucial dimensional parameters and other important metadata. Please edit cautiously (if at all), and back up the original data before doing so. For more information, see the OME-TIFF web site: http://www.openmicroscopy.org/site/support/ome-model/ome-tiff/. --><OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Creator="OME Bio-Formats 5.2.0-m4" UUID="urn:uuid:ea4f0aa6-eb9b-47a7-a3a8-14b87b8cbc76" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06 http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd"><Image ID="Image:0" Name="single-channel"><Pixels BigEndian="true" DimensionOrder="XYZCT" ID="Pixels:0" SizeC="1" SizeT="1" SizeX="439" SizeY="167" SizeZ="1" Type="int8"><Channel ID="Channel:0:0" SamplesPerPixel="1"><LightPath/></Channel><TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1"><UUID FileName="single-channel.ome.tif">urn:uuid:ea4f0aa6-eb9b-47a7-a3a8-14b87b8cbc76</UUID></TiffData></Pixels></Image></OME>
  Software: OME Bio-Formats 5.2.0-m4
ubuntu@ubuntu-xenial:~$ zzuf -r 0 -c tiffinfo corpus/single-channel.ome.tif 
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFF Directory at offset 0x8 (8)
  Image Width: 439 Image Length: 167
  Resolution: 0, 0 pixels/cm
  Bits/Sample: 8
  Sample Format: signed integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  ImageDescription: <?xml version="1.0" encoding="UTF-8"?><!-- Warning: this comment is an OME-XML metadata block, which contains crucial dimensional parameters and other important metadata. Please edit cautiously (if at all), and back up the original data before doing so. For more information, see the OME-TIFF web site: http://www.openmicroscopy.org/site/support/ome-model/ome-tiff/. --><OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Creator="OME Bio-Formats 5.2.0-m4" UUID="urn:uuid:ea4f0aa6-eb9b-47a7-a3a8-14b87b8cbc76" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06 http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd"><Image ID="Image:0" Name="single-channel"><Pixels BigEndian="true" DimensionOrder="XYZCT" ID="Pixels:0" SizeC="1" SizeT="1" SizeX="439" SizeY="167" SizeZ="1" Type="int8"><Channel ID="Channel:0:0" SamplesPerPixel="1"><LightPath/></Channel><TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1"><UUID FileName="single-channel.ome.tif">urn:uuid:ea4f0aa6-eb9b-47a7-a3a8-14b87b8cbc76</UUID></TiffData></Pixels></Image
  Software: OME Bio-Formats 5.2.0-m4

Notice that ImageDescription has been truncated by eight bytes, leading to a warning from tiffinfo. This does not occur with zzuf 0.12.

samhocevar added a commit that referenced this issue Jul 3, 2016
This patch addresses #16 but needs more work and a regression test
before the issue can be closed.
@samhocevar
Copy link
Owner

Thanks for the report. There is a quick fix in master which you can already try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants