|
From: Gonzalez C. J. <jor...@hp...> - 2018-03-27 09:12:35
|
I would like to use the LCMS with python, but when I want to call the function cmsDoTransform the following error appears: TypeError: in method 'cmsDoTransform', argument 2 of type 'void const *'
What I am sending to the cmsDoTransform si the following:
array = [255,255,255]
labColor = lcmsF.transformToLab(array,profileInURL,"RGB","perceptual")
---------------
def transformToLab(inputColor, profileInURL, formatIn, intent, BPC = True):
LabColor = []
labProfile = lcms.cmsCreateLab4Profile(lcms.cmsCIExyY())
inputProfile = lcms.cmsOpenProfileFromFile(profileInURL, "r")
if(formatIn == "RGB"):
inType = lcms.TYPE_RGB_DBL
elif(formatIn == "CMYK"):
inType = lcms.TYPE_CMYK_DBL
if(intent == "perceptual"):
m_intent = lcms.INTENT_PERCEPTUAL
if(BPC):
m_BPC = lcms.cmsFLAGS_BLACKPOINTCOMPENSATION
else:
m_BPC = 0
transform = lcms.cmsCreateTransform(inputProfile, inType, labProfile, lcms.TYPE_Lab_DBL, m_intent, m_BPC)
lcms.cmsDoTransform(transform,inputColor, LabColor, DIM_OUT)
return LabColor
How I am supposed to do it?
Thanks,
Jordi G.C.
|