From: mat on
hi,

i am trying to read in an icc profile and i get the following error message:
"Unrecognized Primary Platform in profile header. See ICC Specification, Clause 6.1.7."

i am using version 2007a.
would be very grateful for any assistance.

thanks
mat
From: Ashish Uthama on
On Thu, 18 Mar 2010 12:56:05 -0400, mat <mjl2810(a)gmail.com> wrote:

> hi,
>
> i am trying to read in an icc profile and i get the following error
> message:
> "Unrecognized Primary Platform in profile header. See ICC Specification,
> Clause 6.1.7."

Did you?

What is the source of this file? (I have a feeling its corrupted).

>
> i am using version 2007a.
> would be very grateful for any assistance.
>
> thanks
> mat
From: Steve Eddins on
mat wrote:
> hi,
>
> i am trying to read in an icc profile and i get the following error
> message:
> "Unrecognized Primary Platform in profile header. See ICC Specification,
> Clause 6.1.7."
>
> i am using version 2007a.
> would be very grateful for any assistance.
>
> thanks
> mat

iccread is being too picky about language in the ICC spec about the
valid set of strings for the primary platform in the header. Some
profile creators are putting things like "linux" in that field, and that
isn't listed as a valid choice in the spec.

You could try modifying your iccread.m to turn the error into a warning.
Look for the following block of code and change the call to error()
to call warning() instead. Oh, and comment out the call to fclose().
Make a backup copy of the original function first.

% Clause 6.1.7 - Primary platform signature
% Four characters, though one code ('SGI ') ends with a blank space.
% Zeros if there is no primary platform.
signature = char(fread_check(fid, 4, '*uint8'))';
if isequal(double(signature), [0 0 0 0])
header.PrimaryPlatform = 'none';
else
switch signature
case 'APPL'
header.PrimaryPlatform = 'Apple';
case 'MSFT'
header.PrimaryPlatform = 'Microsoft';
case 'SGI '
header.PrimaryPlatform = 'SGI';
case 'SUNW'
header.PrimaryPlatform = 'Sun';
case 'TGNT'
header.PrimaryPlatform = 'Taligent';
otherwise
fclose(fid);
eid = 'Images:iccread:invalidPrimaryPlatform';
msg1 = 'Unrecognized Primary Platform in profile header.';
msg2 = ' See ICC Specification, Clause 6.1.7.';
error(eid, '%s\n%s', msg1, msg2);
end
end

---
Steve Eddins
http://blogs.mathworks.com/steve/