Ejemplo n.º 1
0
	def test33_get_embedded_profile(self):
		img = Image.open(get_filepath('CustomRGB.jpg'))
		profile = img.info.get('icc_profile')
		try:
			custom_profile = libcms.cms_open_profile_from_string(profile)
			transform = libcms.cms_create_transform(custom_profile,
							uc2const.TYPE_RGB_8, self.inProfile, uc2const.TYPE_RGB_8,
							uc2const.INTENT_PERCEPTUAL, uc2const.cmsFLAGS_NOTPRECALC)
			img2 = libcms.cms_do_bitmap_transform(transform,
										img, uc2const.TYPE_RGB_8, uc2const.TYPE_RGB_8)
		except libcms.CmsError:
			self.fail()
Ejemplo n.º 2
0
	def test33_get_embedded_profile(self):
		img = Image.open(get_filepath('CustomRGB.jpg'))
		profile = img.info.get('icc_profile')
		try:
			custom_profile = libcms.cms_open_profile_from_string(profile)
			transform = libcms.cms_create_transform(custom_profile,
							uc2const.TYPE_RGB_8, self.inProfile, uc2const.TYPE_RGB_8,
							uc2const.INTENT_PERCEPTUAL, uc2const.cmsFLAGS_NOTPRECALC)
			img2 = libcms.cms_do_bitmap_transform(transform,
										img, uc2const.TYPE_RGB_8, uc2const.TYPE_RGB_8)
		except libcms.CmsError:
			self.fail()
Ejemplo n.º 3
0
def test_get_embedded_profile():
    img = PIL.Image.open(get_filepath('CustomRGB.jpg'))
    profile = img.info.get('icc_profile')
    try:
        custom_profile = libcms.cms_open_profile_from_string(profile)
        transform = libcms.cms_create_transform(custom_profile,
                                                uc2const.TYPE_RGB_8,
                                                IN_PROFILE,
                                                uc2const.TYPE_RGB_8,
                                                uc2const.INTENT_PERCEPTUAL,
                                                uc2const.cmsFLAGS_NOTPRECALC)
        libcms.cms_do_bitmap_transform(transform, img, uc2const.TYPE_RGB_8,
                                       uc2const.TYPE_RGB_8)
    except libcms.CmsError:
        assert False