Re: [Lcms-user] Profile ID mismatch between Linux and Windows?
An ICC-based CMM for color management
Brought to you by:
mm2
From: L. E. S. <am...@am...> - 2023-03-03 17:52:05
|
Hi Marti, This is the flow Krita follows for computing a profile ID: https://invent.kde.org/graphics/krita/-/blob/master/plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp#L551-573 In short, we retrieve the MD5 checksum of the profile if available, otherwise we tell LCMS to calculate it, then get it through cmsGetHeaderProfileID. I'll try and see what's going on once I finish with my current intray. Best, amyspark On 03/03/2023 10:55, mar...@li... wrote: > Hello, > > Not sure what steps are you following, but there is currently no functionality in lcms2 to compute the MD5 of an existing profile. > > The function cmsMD5computeID() computes the MD5 for a *new* profile you are creating. Which is not the same as the profile you have just open. Please note the function does not return any hash, it just stores it in the profile header to be latter saved. The idea is to call this function before saving in the case you want to include MD5 checksum in the profile. > > In your case, opening the profile "sRGB-elle-V4-srgbtrc.icc" gives a valid template in the handle that you could modify by using cmsWriteTag(). If you save this handle with cmsSaveProfileToFile(), you would obtain a new profile with same functionality but not necessarily with same layout. Maybe with some extra tags, maybe with user-defined tags stripped down. The header will be different, too. For sure creation datetime and platform could change. So, the MD5 will obviously be different and profiles remain valid, but not binary equal. This was never intended to keep same layout, nor to be a profile editor that preserves fields. > > If you want a function to compute the MD5 of a yet existing profile, I could add it to 2.16, just let me know. > > Regards > Marti > > > >> -----Original Message----- >> From: L. E. Segovia via Lcms-user <lcm...@li...> >> Sent: Thursday, March 2, 2023 4:56 PM >> To: lcm...@li... >> Subject: [Lcms-user] Profile ID mismatch between Linux and Windows? >> >> Hi all, >> >> We've just found something strange when getting the MD5 checksum of a >> profile through cmsMD5computeID. Judging from Halla Rempt's test here, >> >> https://invent.kde.org/graphics/krita/- >> /commit/1191295a4618a93893987497e3c54e6f0c2fd025#note_634123 >> >> the profile 'sRGB-elle-V4-srgbtrc' results in two different hashes depending >> on the operating system; 84f64878faf21217362594685be031d5 is the >> Windows hash, and 133a66607cffeebdd64dd433ada9bf4e is the Linux hash. >> >> The profile is available here: >> >> https://invent.kde.org/graphics/krita/- >> /blob/1191295a4618a93893987497e3c54e6f0c2fd025/libs/flake/tests/data/icc >> /sRGB-elle-V4-srgbtrc.icc >> >> Or alternatively: >> >> https://invent.kde.org/graphics/krita/- >> /blob/1191295a4618a93893987497e3c54e6f0c2fd025/krita/data/profiles/elles >> -icc-profiles/sRGB-elle-V4-srgbtrc.icc >> >> As a verification, the sha256sum of the icc file is: >> >> 52d632fd6c3d2389a767a84faa0919beae6498eeb501730d170e90f0f86f594f >> sRGB-elle-V4-srgbtrc.icc >> >> Please let me know if you've run into this before, if not, I'll try to debug it >> myself during the weekend. >> >> Best, >> >> amyspark >> >> -- >> amyspark 🌸 https://www.amyspark.me >> >> >> _______________________________________________ >> Lcms-user mailing list >> Lcm...@li... >> https://lists.sourceforge.net/lists/listinfo/lcms-user > -- amyspark 🌸 https://www.amyspark.me |