[Openicc] Renaming an ICC profile

Florian Höch lists+openicc at hoech.org
Wed May 14 07:50:58 PDT 2014


Am 14.05.2014 16:14, schrieb Richard Hughes:
> On 14 May 2014 14:56, Max Derhak <Max.Derhak at onyxgfx.com> wrote:
>> I'm a bit concerned about using the concept of "Original Checksum"
>> as a metadata element.
> 
> Right.
> 
>> Just like changing a filename you need to modify all references to
>> it in order for things to be consistent.
> 
> Yes, that's also an option that I didn't mention in my original
> mail. It's highly unlikely the profile is mapped to hundreds of
> different devices, or that there are hundreds of profiles mapped to a
> device, so it should be insanely quick to do this.

+1

>> Additionally, what happens when someone adds the original profile
>> again to the system, you then have two profiles with the same
>> checksum?
> 
> I didn't think about that case, thanks. Maybe just dump the 
> checksum-metadata idea and just Device.ProfileAdd the new profile.
> All this can be handled in the daemon, and so can be done atomically
> as one step and without any visual glitches.

+1

Some general comments: ICC v2 profiles also support an Unicode
description in the TextDescriptionType tag, but just one localized
variant. It is still a good idea to provide an (additional) 7bit ASCII
description (I think it might even be required, but I'd have to check
the spec). The way I go about this when I'm writing out profiles in my
own software is I check if the ASCII string and Unicode string would be
the same, and if so only write the ASCII description. If they're not the
same because some characters are not representable in ASCII, I replace
all non-representable characters with a substitution character
(currently "?") and set that as the ASCII description in the hope I
won't end up with a string that is all "???" (maybe not ideal, comments
welcome).

Also I'd consider it good practice to keep the actual profile filename
and description in sync (atleast for user profiles, e.g. filename "My
printer profile.icc", description "My printer profile"), which might
pose an interesting challenge to profile renaming, but maybe also opens
up possibilities for implementing this without additional UI (you'd have
to monitor profile filename changes and then do the right thing to the
description, not sure how feasible this is though).

-- 
Florian Höch



More information about the openicc mailing list