예제 #1
0
def probe_colorspace():
    paths = [
        "/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_cmyk.tif",
        "/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_grayscale.jpeg",
        "/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_lab.tif",
        "/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_rgb.png",
        "/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_srgb.png",
    ]
    for path in paths:
        wand = _libimg.new_image()
        _libimg.load_image(wand, path)
        _libimg.reset_iterator(wand)
        _libimg.next_image(wand)
        name = path.split('/')[-1]
        print name, '==>', _libimg.get_colorspace(wand)
예제 #2
0
파일: __init__.py 프로젝트: Scrik/sk1-wx
def probe_colorspace():
	paths = [
	"/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_cmyk.tif",
	"/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_grayscale.jpeg",
	"/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_lab.tif",
	"/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_rgb.png",
	"/home/igor/ws4/uniconvertor-2.x/trunk/src/unittests/_libimg_tests/img_data/cs_srgb.png",
		]
	for path in paths:
		wand = _libimg.new_image()
		_libimg.load_image(wand, path)
		_libimg.reset_iterator(wand)
		_libimg.next_image(wand)
		name = path.split('/')[-1]
		print name, '==>', _libimg.get_colorspace(wand)
예제 #3
0
	def test07_image_type(self):
		names = []
# 		names.append(['type_bilevel.png', 'BilevelType'])
		names.append(['type_grayscale.png', 'GrayscaleType'])
		names.append(['type_palette.png', 'PaletteType'])
# 		names.append(['type_palettematte.png', 'PaletteMatteType'])
		names.append(['type_truecolor.png', 'TrueColorType'])
		names.append(['type_truecolormatte.png', 'TrueColorMatteType'])
		names.append(['type_cmyk.tif', 'ColorSeparationType'])
		names.append(['type_cmyka.tif', 'ColorSeparationMatteType'])

		for name in names:
			wand = _libimg.new_image()
			path = os.path.join(_pkgdir, 'img_data', name[0])
			result = _libimg.load_image(wand, path)
			self.assertEqual(1, result)
			_libimg.reset_iterator(wand)
			_libimg.next_image(wand)
			self.assertEqual(name[1], _libimg.get_image_type(wand))
예제 #4
0
파일: __init__.py 프로젝트: Scrik/sk1-wx
	def test07_image_type(self):
		names = []
		names.append(['type_bilevel.png', 'BilevelType'])
		names.append(['type_grayscale.png', 'GrayscaleType'])
		names.append(['type_palette.png', 'PaletteType'])
		names.append(['type_palettematte.png', 'PaletteMatteType'])
		names.append(['type_truecolor.png', 'TrueColorType'])
		names.append(['type_truecolormatte.png', 'TrueColorMatteType'])
		names.append(['type_cmyk.tif', 'ColorSeparationType'])
		names.append(['type_cmyka.tif', 'ColorSeparationMatteType'])

		for name in names:
			wand = _libimg.new_image()
			path = os.path.join(_pkgdir, 'img_data', name[0])
			result = _libimg.load_image(wand, path)
			self.assertEqual(1, result)
			_libimg.reset_iterator(wand)
			_libimg.next_image(wand)
			self.assertEqual(name[1], _libimg.get_image_type(wand))