phatch-dev team mailing list archive
-
phatch-dev team
-
Mailing list archive
-
Message #01191
[Bug 532346] Re: [Test] ValueError: cannot filter palette images
http://bazaar.launchpad.net/~stani/phatch/trunk/revision/1700
** Changed in: phatch
Status: Confirmed => Fix Committed
** Changed in: phatch
Assignee: (unassigned) => stani (stani)
--
[Test] ValueError: cannot filter palette images
https://bugs.launchpad.net/bugs/532346
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: Fix Committed
Bug description:
This affects maximum, medium and minimum, but we should scan all image.filter occurrences to be sure. Probably a imtools.safe_convert is enough.
actionlist: /home/stani/Desktop/repo/lucid/tests/output/actionlists/maximum_Radius=3.phatch
Error 0:Can not apply action Maximum on image 'frog.gif' in folder:
/home/stani/Desktop/repo/lucid/tests/input
cannot filter palette images
Action:{'fields': {'Amount': u'100', 'Radius': u'3', '__enabled__': 'yes'},
'label': 'Maximum'}
Traceback (most recent call last):
File "/home/stani/Desktop/repo/lucid/phatch/core/api.py", line 617, in apply_action_to_photo
photo = action.apply(photo, read_only_settings, cache)
File "/home/stani/Desktop/repo/lucid/phatch/core/models.py", line 106, in apply
photo.get_layer().apply_pil(self.pil, **values)
File "/home/stani/Desktop/repo/lucid/phatch/core/pil.py", line 747, in apply_pil
self.image = function(self.image, *arg, **keyw)
File "/home/stani/Desktop/repo/lucid/phatch/actions/maximum.py", line 39, in maximum
maximumed = image.filter(ImageFilter.MaxFilter(radius))
File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 813, in filter
return self._new(filter.filter(self.im))
File "/usr/lib/python2.6/dist-packages/PIL/ImageFilter.py", line 82, in filter
raise ValueError("cannot filter palette images")
ValueError: cannot filter palette images
*
actionlist: /home/stani/Desktop/repo/lucid/tests/output/actionlists/median_Radius=3.phatch
Error 0:Can not apply action Median on image 'frog.gif' in folder:
/home/stani/Desktop/repo/lucid/tests/input
cannot filter palette images
Action:{'fields': {'Amount': u'100', 'Radius': u'3', '__enabled__': 'yes'},
'label': 'Median'}
Traceback (most recent call last):
File "/home/stani/Desktop/repo/lucid/phatch/core/api.py", line 617, in apply_action_to_photo
photo = action.apply(photo, read_only_settings, cache)
File "/home/stani/Desktop/repo/lucid/phatch/core/models.py", line 106, in apply
photo.get_layer().apply_pil(self.pil, **values)
File "/home/stani/Desktop/repo/lucid/phatch/core/pil.py", line 747, in apply_pil
self.image = function(self.image, *arg, **keyw)
File "/home/stani/Desktop/repo/lucid/phatch/actions/median.py", line 39, in median
medianed = image.filter(ImageFilter.MedianFilter(radius))
File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 813, in filter
return self._new(filter.filter(self.im))
File "/usr/lib/python2.6/dist-packages/PIL/ImageFilter.py", line 82, in filter
raise ValueError("cannot filter palette images")
ValueError: cannot filter palette images
*
References