← Back to team overview

phatch-dev team mailing list archive

[Bug 532346] [NEW] [Test] ValueError: cannot filter palette images

 

Public bug reported:

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
*

** Affects: phatch
     Importance: High
         Status: Confirmed

-- 
[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!: Confirmed

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
*





Follow ups

References