Hi, > how likely am I to encounter pre-V4 profiles that don't have a ProfileID available?
For sure. All pre-v4 have NOT profile ID. And yes, I will incorporate MD5 digest on lcms, but this would be when including the support for writing v4 profiles, which lcms currently only reads. Anyway, there is noting that forces you to use ProfileID and MD5 a simple compare between both memory blocks would suffice. The only important point is you should ignore differences in the header, because same profile may have different header on depending embedded or not. Example: - Read in memory ProfileA and ProfileB - compare bytes from profileA from beginning + sizeof(icHeader) to end with bytes from profileB from beginning + sizeof(icHeader) to end - If same bytes, profiles are equal. Of course you can use any CRC or hash functoin to digest both block of bytes to a single value. This would speed the comparation in some circunstances, but usually there is no need to do that. Regards, Marti Maria The little cms project http://www.littlecms.com ----- Original Message ----- From: "Alastair M. Robinson" <[EMAIL PROTECTED]> To: "Marti Maria" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, August 10, 2004 5:19 PM Subject: Re: [Lcms-user] Comparing profiles for equality? Hi Marti, Marti Maria wrote: > There is no exact way to do that, because same colorspace can be > encoded in different profiles otherwise numerically equivalent. In > practice, it is enough to check whatever both files are equal > DISCOUNTING THE HEADER. This is important because some > flags may be changed when embedding. V4 ProfileID is computed > taking the MD5 of whole profile after header, and this would be > enough in most cases. Thanks for the response - how likely am I to encounter pre-V4 profiles that don't have a ProfileID available? Any chance of LCMS transparently calculating a suitable ID for pre-V4 profiles in the future (or does it already)? All the best, -- Alastair M. Robinson ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Lcms-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/lcms-user