def createProfile(colorSpace, colorTemp=(-1)):
 if (colorSpace not in ['LAB', 'XYZ', 'sRGB']):
  raise PyCMSError(('Color space not supported for on-the-fly profile creation (%s)' % colorSpace))
 if (colorSpace == 'LAB'):
  try:
   colorTemp = float(colorTemp)
  except:
   raise PyCMSError(('Color temperature must be numeric, "%s" not valid' % colorTemp))
 try:
  return core.createProfile(colorSpace, colorTemp)
 except (TypeError, ValueError) as v:
  raise PyCMSError(v)

def createProfile ( colorSpace , colorTemp = ( - 1 ) ) : if ( colorSpace not in [ 'LAB' , 'XYZ' , 'sRGB' ] ) : raise PyCMSError ( ( 'Color space not supported for on-the-fly profile creation (%s)' % colorSpace ) ) if ( colorSpace == 'LAB' ) : try : colorTemp = float ( colorTemp ) except : raise PyCMSError ( ( 'Color temperature must be numeric, "%s" not valid' % colorTemp ) ) try : return core . createProfile ( colorSpace , colorTemp ) except ( TypeError , ValueError ) as v : raise PyCMSError ( v )
creates a profile .