[Openicc] iccProfileDump: NonCompliant! - Bad Header File Size

Max Derhak Max.Derhak at onyxgfx.com
Thu Apr 24 20:21:12 PDT 2014


My understanding of the padding requirement in ICC.1:1998 comes from the following section.

6.2.4 Tag Data Requirements

All tag data is required to start on a 4-byte boundary (relative to the start of the
profile header) so that a tag starting with a 32 bit value will be properly aligned
without the tag handler needing to know the contents of the tag. This means that
the least-significant two bits of the beginning offset must be zero. The element
size must be for the actual data and must not include any padding at the end of
the tag data.

This implies to me that tag data should always end on a 4-byte boundary (with padding).  However, I agree that this is indirect as it relates to file size (hence the specification revisions to clarify things).

I could make a change in the CheckFileSize() function to only check the alignment of the file size if the version is 4.2 or greater.

Max Derhak
Principal Scientist
max.derhak at onyxgfx.com


-----Original Message-----
From: openicc [mailto:openicc-bounces at lists.freedesktop.org] On Behalf Of Kai-Uwe Behrmann
Sent: Thursday, April 24, 2014 1:08 PM
To: openicc at lists.freedesktop.org
Subject: [Openicc] iccProfileDump: NonCompliant! - Bad Header File Size

SampleICC's iccProfileDump -v tool gives me a warning about a old v2.3 sRGB.icc profile.

What wonders me is the absence of the 4 byte padding requirement in the old Spec. ICC.1:1998-09 or Spec ICC.1:2001-04 specs. See section 6.1.1 "Profile size".
Since the ICC v4 spec there is such a requirement formulated. See section 7.1 "General" Note 1.

The output is as follows:
iccDumpProfile -v /usr/share/color/icc/OpenICC/sRGB.icc
Profile:          '/usr/share/color/icc/OpenICC/sRGB.icc'
Profile ID:        7fb30d688bf82d32a0e748daf3dba95d
Size:             6922(0x1b0a) bytes

Header
------
Attributes:       Reflective | Glossy
Cmm:              Little CMS
Creation Date:    8/13/2004  12:18:06
Creator:          'lcms' = 6C636D73
Data Color Space: RgbData
Flags             EmbeddedProfileFalse | UseAnywhere
PCS Color Space:  XYZData
Platform:         Microsoft
Rendering Intent: Perceptual
Type:             DisplayClass
Version:          2.30
Illuminant:       X=0.9642, Y=1.0000, Z=0.8249

...

Validation Report
-----------------
Profile is valid

NonCompliant! - Bad Header File Size

What does the last line mean? Does SampleICC only check for v4 spec compliance? I would assume this particular profile is valid and compiant as per v2 spec.

kind regards
Kai-Uwe
_______________________________________________
openicc mailing list
openicc at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/openicc




More information about the openicc mailing list