On 12/31/2012 12:54 PM, chaouche yacine wrote:
Hello. I have a gif animation that has 190 layers. It's a too much. I want to 
remove one out of three layers via the python-fu console. Here's what I did :

image = gimp.image_list()[0]
image.layers = [layer for (index,layer) in enumerate(image.layers) if index  % 
Traceback (most recent call last):
   File "<input>", line 1, in <module>
AttributeError: attribute 'layers' of 'gimp.Image' objects is not writable
What is the correct way of removing layers ?

for (index,layer) in enumerate(image.layers):
...     if not index%3:
...         image.remove_layer(layer)
gimp-user-list mailing list

Reply via email to