Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exporting all the layers
#1
Hi,

I please need a script which exports all the layers, one by one, in png format.

The result could be something like :

1_nameLayer1.png
2_nameLayer2.png
3_nameLayer3.png
..

Where 1, 2, 3,.. are respectively the positions (levels) of the layers nameLayer1, nameLayer2, nameLayer3,.. of the gimp image file ; I need to keep the transparency.

It is unfortunately impossible for me to install the gimp pyton module, so, does please this scrpit exist in gimp by an other way ?

Thanks Smile
Reply
#2
Ah... no python Wink

However, try the attached script-fu, looks like this 

   


Attached Files
.zip   export-layers-plus.zip (Size: 3.91 KB / Downloads: 1,060)
Reply
#3
Thanks a lot !!
Reply
#4
Hi,

Your script-fu is so usefull for me  Smile ; and is it please possible to export the transparency of the layers too ?

Thanks !
Reply
#5
(05-09-2022, 07:03 AM)aka Wrote: Hi,

Your script-fu is so usefull for me  Smile ; and is it please possible to export the transparency of the layers too ?

Thanks !

The build in opacity or the opacity set by the slider? The later is really only the opacity of the layer when composited with the others and is not really part of he layer data.
Reply
#6
I was speaking about the opacity of the layer ; but perhaps is it simply possible to change the opacity of a selected part of a layer ?
Reply
#7
(05-09-2022, 08:02 AM)aka Wrote: I was speaking about the opacity of the layer ; but perhaps is it simply possible to change the opacity of a selected part of a layer ?

If you export layers as png (for transparency)  with each layer having variable transparency, even if that is a layer mask, you get an image with that transparency.

   
Reply
#8
(12-30-2021, 07:37 PM)rich2005 Wrote: Ah... no python Wink

However, try the attached script-fu, looks like this 

Thank you, that is marvelous! Juste one thing maybe it's me: the exported files don't take into account that I cropped my image before exporting, which was the point of my operation (cropping unused part of the image). Is that the script or a setting I need to adjust in Gimp?
Reply
#9
(02-11-2023, 05:11 AM)stepha_net Wrote: ...snip...the exported files don't take into account that I cropped my image before exporting, which was the point of my operation (cropping unused part of the image). Is that the script or a setting I need to adjust in Gimp?

Probably the crop tool settings.  By default (used to be, maybe still is) the Delete Cropped Pixels toggle is off
That just hides the cropped area, in case you need to recover it. You can actually see this if you enable View -> Show All.  The crop only come into effect when you Export in Gimp flattening all your layers.

Repeat the crop of the layers with Delete Cropped Pixels toggle on

   
Reply
#10
(02-11-2023, 05:11 AM)stepha_net Wrote:
(12-30-2021, 07:37 PM)rich2005 Wrote: Ah... no python Wink

However, try the attached script-fu, looks like this 

Thank you, that is marvelous! Juste one thing maybe it's me: the exported files don't take into account that I cropped my image before exporting, which was the point of my operation (cropping unused part of the image). Is that the script or a setting I need to adjust in Gimp?

The individual layer export operations export the full layers. If you crop your image, use the Delete cropped pixels option of the Crop tool.
Reply


Forum Jump: