def test06_number_images(self): names = [] names.append(os.path.join(_pkgdir, 'img_data', '1layer.gif')) names.append(os.path.join(_pkgdir, 'img_data', '2layer.gif')) names.append(os.path.join(_pkgdir, 'img_data', '3layer.gif')) for name in names: wand = _libimg.new_image() result = _libimg.load_image(wand, name) self.assertEqual(1, result) num = _libimg.get_number_images(wand) self.assertEqual(names.index(name) + 1, num)
def probe_number_images(): filepath = os.path.join(_pkgdir, '3layer.gif') wand = _libimg.new_image() _libimg.load_image(wand, filepath) print _libimg.get_number_images(wand)