Hi :) Kevin Gale wrote:
> Performing some sort of check on the data was what I had in mind. My original > plan was to compare the names but performing a check across the entire > profile data would probably be better. When I asked something similar several years ago, the advice I received was that binary comparison or MD5 hash of the profile data is as good as any method, but it should skip the ICC header, because an embedded and on-disk version of the same profile can have differing flags, but be otherwise identical. Reference here: http://www.mail-archive.com/lcms-user@lists.sourceforge.net/msg00889.html What I do in Photoprint's lcms wrapper is take an MD5 hash of all profiles, be they embedded, disk-based or generated on the fly, like this: md5=new MD5Digest(buffer+sizeof(icHeader),buflen-sizeof(icHeader)); The MD5s are useful for more than just comparing for equality - to avoid generating transforms unneccessarily, I use a transform cache, and tag each transform with the MD5 of the source and destination profile, along with the intent. All the best, -- Alastair M. Robinson ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user