Comment 6 for bug 236462

Revision history for this message
Zdeněk Dlauhý (zdlauhy) wrote : Re: Phatch cannot manipulate with color indexed png

I think that this fix has some other effects...

so

Error 0: Nemohu aplikovat akci Převodní mód na obrázek '1.png' v adresáři:
/tmp/1

cannot read interlaced PNG files

Action: {'fields': {'Mode': u'RGB (3x8-bit pixels, true colour)',
            '__enabled__': u'true'},
 'label': 'Convert Mode'}

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/phatch/core/api.py", line 277, in apply_action
    photo = action.apply(photo,setting,cache)
  File "/usr/lib/python2.5/site-packages/phatch/actions/convert_mode.py", line 39, in apply
    photo.convert(mode)
  File "/usr/lib/python2.5/site-packages/phatch/core/pil.py", line 354, in convert
    layer.image = layer.image.convert(mode,*args,**keyw)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 654, in convert
    self.load()
  File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line 155, in load
    self.load_prepare()
  File "/usr/lib/python2.5/site-packages/PIL/PngImagePlugin.py", line 337, in load_prepare
    raise IOError("cannot read interlaced PNG files")
IOError: cannot read interlaced PNG files
*
Error 1: Nemohu aplikovat akci Převodní mód na obrázek '3.png' v adresáři:
/tmp/1

cannot read interlaced PNG files

Action: {'fields': {'Mode': u'RGB (3x8-bit pixels, true colour)',
            '__enabled__': u'true'},
 'label': 'Convert Mode'}

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/phatch/core/api.py", line 277, in apply_action
    photo = action.apply(photo,setting,cache)
  File "/usr/lib/python2.5/site-packages/phatch/actions/convert_mode.py", line 39, in apply
    photo.convert(mode)
  File "/usr/lib/python2.5/site-packages/phatch/core/pil.py", line 354, in convert
    layer.image = layer.image.convert(mode,*args,**keyw)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 654, in convert
    self.load()
  File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line 155, in load
    self.load_prepare()
  File "/usr/lib/python2.5/site-packages/PIL/PngImagePlugin.py", line 337, in load_prepare
    raise IOError("cannot read interlaced PNG files")
IOError: cannot read interlaced PNG files
*

**************************************
phatch file

fractal@fractal-laptop 14:03:59 :~$ cat .phatch/actionlists/Konvertovat_na_jpg.phatch
{'actions': [{'fields': {'Mode': u'RGB (3x8-bit pixels, true colour)',
                         '__enabled__': u'true'},
              'label': 'Convert Mode'},
             {'fields': {'As': u'jpeg',
                         'Filename': u'<filename>',
                         'In': u'<folder>_phatch/<subfolder>',
                         'JPG Quality': u'85',
                         'JPG Size Maximum': '0kb',
                         'JPG Size Tolerance': '5%',
                         'PNG Optimize': u'false',
                         'Resolution': u'<dpi>',
                         '__enabled__': u'true'},
              'label': 'Save'}],
 'description': u'Zde popi\u0161te seznam akc\xed.'}fractal@fractal-laptop 14:47:51 :~$