mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
571 stars 176 forks source link

Simple Question: How do I get "cmsICCMeasurementConditions" data in IccProfile? #418

Closed diuming closed 11 months ago

diuming commented 11 months ago

I don't have any idea to get cmsICCMeasurementConditions data in IccProfile. help me?

mm2 commented 11 months ago

This is metadata. The ICC profile may or may not contain it.

To see if the data is there:

cmsIsTag(hProfile, cmsSigMeasurementType)

To read the data: ptr = (cmsICCMeasurementConditions*) cmsReadTag(hProfile, cmsSigMeasurementType)

You can also use that latter to check for data existence. You will get a NULL if data is not there.

See testcms2.c unit test on CheckMeasurement() function for an example

diuming commented 11 months ago

@mm2, I got it, thanks!