I have a GIF image file. I opened it using PIL.Image
and did a couple of size transforms on it. Then I tried to use ImageSharpness.Enhance()
on it...
sharpener = PIL.ImageEnhance.Sharpness(img)
sharpened = sharpener.enhance(2.0)
This is causing an exception:
<type 'exceptions.ValueError'>
('cannot filter palette images',)
I tried to google for this error, but did not find anything. Can someone help me figure out what is going wrong?
FYI the mode of the input image is 'P'
. I don't have this problem if I work with jpg images.