Bug 1310188

Summary: Libtiff Ignoring ColorMap since BitsPerSample tag not found in palette images on x86_64 and i386
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Hradílek <mhradile>
Component: libtiffAssignee: Nikola Forró <nforro>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Hradílek <mhradile>
Severity: high Docs Contact:
Priority: high    
Version: 6.7CC: bnater, isenfeld
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-30 17:16:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Hradílek 2016-02-19 17:07:43 UTC
Description of problem:
In new libtiff packages (unreleased) there libtiff utilities can not read palette images due to missing bits per sample tag. It works on other arches as well as on rhel7 varient.

Version-Release number of selected component (if applicable):
libtiff-3.9.4-10.el6_7.x86_64

How reproducible:
100%

Steps to Reproduce:
# tiffmedian test.tiff output_new.tiff
# tiffinfo output_new.tiff 
TIFFReadDirectory: Warning, Ignoring ColorMap since BitsPerSample tag not found.
MissingRequired: output_new.tiff: TIFF directory is missing required "Colormap" field.

Expected results:
# tiffinfo output_old.tiff 
TIFF Directory at offset 0x9cc (2508)
  Subfile Type: (0 = 0x0)
  Image Width: 50 Image Length: 50
  Resolution: 72, 72 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: palette color (RGB from colormap)
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 163
  Planar Configuration: single image plane
  Color Map: (present)

Comment 5 Miroslav Hradílek 2016-08-30 17:16:21 UTC
I can confirm that this no longer reproduces on the mentioned build libtiff-3.9.4-18

# rpm -q libtiff
libtiff-3.9.4-18.el6_8.x86_64
#  tiffmedian test.tiff output_new.tiff
# tiffinfo output_new.tiff
TIFF Directory at offset 0x9cc (2508)
  Subfile Type: (0 = 0x0)
  Image Width: 50 Image Length: 50
  Resolution: 72, 72 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: palette color (RGB from colormap)
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 163
  Planar Configuration: single image plane
  Color Map: (present)

Closing.