code: def image_create(cmptparms, cspace):
      
      lst = [ctypes.c_int, ctypes.POINTER(ImageComptParmType), ctypes.c_int]
      OPENJPEG.opj_image_create.argtypes = lst
      OPENJPEG.opj_image_create.restype = ctypes.POINTER(ImageType)
  
      image = OPENJPEG.opj_image_create(len(cmptparms), cmptparms, cspace)
      return(image)
docs: Wrapper for openjpeg library function opj_image_create.