Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-j.one.com (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id 3C104400911
	for <filtered@awaresystems.be>; Wed, 30 Nov 2011 12:41:23 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-j: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.160.176 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-gy0-f176.google.com (mail-gy0-f176.google.com [209.85.160.176])
	by mx-j.one.com (Postfix) with ESMTP id CE8D618A135
	for <filtered@awaresystems.be>; Wed, 30 Nov 2011 11:41:22 +0000 (UTC)
Received: by ghbg2 with SMTP id g2so650261ghb.21
        for <filtered@awaresystems.be>; Wed, 30 Nov 2011 03:41:22 -0800 (PST)
Received: by 10.68.36.1 with SMTP id m1mr6619987pbj.3.1322653281538;
        Wed, 30 Nov 2011 03:41:21 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.142.241.19 with SMTP id o19cs186132wfh;
        Wed, 30 Nov 2011 03:41:20 -0800 (PST)
Received: by 10.50.34.202 with SMTP id b10mr1945729igj.13.1322653279183;
        Wed, 30 Nov 2011 03:41:19 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.55 as permitted sender) client-ip=91.198.169.55;
Received: by 10.12.42.10 with POP3 id p10mf998716iap.23;
        Wed, 30 Nov 2011 03:41:19 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.one.com (mx-h.one.com [91.198.169.55])
	by mail9.b-one.net (Postfix) with ESMTP id 4998B400911
	for <info@awaresystems.be>; Wed, 30 Nov 2011 12:27:23 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-h.one.com (Postfix) with ESMTP id E5E771BB88C
	for <info@awaresystems.be>; Wed, 30 Nov 2011 11:27:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id A90EF1ED8EF;
	Wed, 30 Nov 2011 06:25:47 -0500 (EST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com
	[209.85.160.172])
	by lists.maptools.org (Postfix) with ESMTPS id C25F51ED8EF
	for <tiff@lists.maptools.org>; Wed, 30 Nov 2011 06:23:38 -0500 (EST)
Received: by ghrr18 with SMTP id r18so509640ghr.3
	for <tiff@lists.maptools.org>; Wed, 30 Nov 2011 03:23:38 -0800 (PST)
MIME-Version: 1.0
Received: by 10.236.173.233 with SMTP id v69mr2727290yhl.46.1322652218091;
	Wed, 30 Nov 2011 03:23:38 -0800 (PST)
Received: by 10.150.57.14 with HTTP; Wed, 30 Nov 2011 03:23:38 -0800 (PST)
X-Originating-IP: [82.110.183.162]
Date: Wed, 30 Nov 2011 11:23:38 +0000
Message-ID: <CABUeae-f0FYniBJreX4Jymjt3EQMn0efTUNeUL3JtdJV-PD_gg@mail.gmail.com>
From: =?UTF-8?Q?Mateusz_=C5=81oskot?= <mateusz@loskot.net>
To: tiff@lists.maptools.org
Subject: [Tiff] Inconsistent metadata report for CMYK 8-bit image
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Hi,

I have a CMYK TIFF image and I'm having problems to identify
what is its actual configuration.
I'm not sure if I can post images as attachment to the list,
so I uploaded it to my server:

http://mateusz.loskot.net/tmp/Shadow_cmyk8.tif (2.6 MB)
http://mateusz.loskot.net/tmp/Shadow_cmyk8.zip (0.5 MB)

I have tried three different tools and each of them reports
slightly different configuration:

####################################################################
1) tiffinfo (libtiff 4.0.0 Beta7 (32-bit build on Windows 64-bit))

C:\> tiffinfo Shadow_cmyk8.tif
Unknown field with tag 37724 (0x935c) encountered.
TIFF Directory at offset 0x8 (8)
  Subfile Type: (0 = 0x0)
  Image Width: 768 Image Length: 505
  Resolution: 72, 72 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: separated
  Extra Samples: 1<assoc-alpha>
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 5
  Rows/Strip: 505
  Planar Configuration: single image plane
  Software: Adobe Photoshop CS3 Windows
  DateTime: 2011:10:31 14:09:04
  XMLPacket (XMP Metadata):
...

####################################################################
2) gdalinfo (from current OSGeo4W package)

C:\> gdalinfo Shadow_cmyk8.tif
Warning 1: TIFFReadDirectory:Unknown field with tag 37724 (0x935c) encountered
Driver: GTiff/GeoTIFF
Files: Shadow_cmyk8.tif
Size is 768, 505
Coordinate System is `'
Metadata:
  TIFFTAG_SOFTWARE=Adobe Photoshop CS3 Windows
  TIFFTAG_DATETIME=2011:10:31 14:09:04
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  SOURCE_COLOR_SPACE=CMYK
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  505.0)
Upper Right (  768.0,    0.0)
Lower Right (  768.0,  505.0)
Center      (  384.0,  252.5)
Band 1 Block=768x2 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=768x2 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=768x2 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=768x2 Type=Byte, ColorInterp=Alpha

####################################################################
3) identify from ImageMagick 6.7.3

C>identify -verbose Shadow_cmyk8.tif
Image: Shadow_cmyk8.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 768x505+0+0
  Resolution: 72x72
  Print size: 10.6667x7.01389
  Units: PixelsPerInch
  Type: ColorSeparationMatte
  Base type: ColorSeparation
  Endianess: MSB
  Colorspace: CMYK
  Depth: 8/16-bit
  Channel depth:
    cyan: 16-bit
    magenta: 16-bit
    yellow: 16-bit
    black: 8-bit
    alpha: 8-bit
  Channel statistics:
    Cyan:
      min: 0 (0)
      max: 255 (1)
      mean: 30.1219 (0.118125)
      standard deviation: 81.5185 (0.31968)
      kurtosis: 3.67711
      skewness: 2.37807
    Magenta:
      min: 0 (0)
      max: 255 (1)
      mean: 69.7906 (0.273689)
      standard deviation: 113.31 (0.444351)
      kurtosis: -0.984415
      skewness: 1.00769
    Yellow:
      min: 0 (0)
      max: 250 (0.980392)
      mean: 43.7205 (0.171453)
      standard deviation: 89.2673 (0.350068)
      kurtosis: 1.31287
      skewness: 1.78273
    Black:
      min: 0 (0)
      max: 24 (0.0941176)
      mean: 1.10718 (0.00434189)
      standard deviation: 4.21034 (0.0165111)
      kurtosis: 16.1728
      skewness: 4.11968
    Alpha:
      min: 0 (0)
      max: 255 (1)
      mean: 46.9553 (0.184138)
      standard deviation: 93.2179 (0.36556)
      kurtosis: 0.885903
      skewness: -1.64831
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 70.557 (0.276694)
      standard deviation: 85.0415 (0.333496)
      kurtosis: 3.04391
      skewness: 2.26633
  Total ink density: 233%
  Alpha: cmyka(0,0,0,0,0)   #0000000000
  Rendering intent: Undefined
  Interlace: None
  Background color: cmyka(255,255,255,0,1)
  Border color: cmyka(223,223,223,0,1)
  Matte color: cmyka(189,189,189,0,1)
  Transparent color: cmyka(0,0,0,0,0)
  Compose: Over
  Page geometry: 768x505+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
...
####################################################################

Which one is right?
How many bits per sample and how many samples per pixel is there?

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
