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  % 
3]
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
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list

Reply via email to