Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Searching for python script islands to layers
#1
Hi, I'm searching for a plugin that converts a layer's non-transparent items/islands to multiple layers with each layer an item/island.
Please help, I am non-programmer and tried very simple python script but am very novice.
Actions/steps should be:
1. make sure tranparency is already mask layer, else make mask layer with right-click Layer > "Add Layer Mask..." > "Layer's alpha channel"

2. make duplicate of current layer as backup named temp_layer.

3. select temp_layer

4. go to every pixel in every row in temp_layer, if pixel's transparency is 0 (mask layer pixel is black) than do nothing
if transparency is not 0 (mask layer pixel is not black) select "fuzzy select tool" on position of that pixel with settings "Threshhold" at 254.9 and checked off "antialiasing", "feather edges", "select transparent areas" and "sample merged".

5. duplicate temp_layer and call it item### or island### for example island001.

6. crop to selection in island001 layer (Layer > Crop to Selection).

7. go back to temp_layer and make selection fully transparent in mask layer by filling selection with black color

8. update temp_layer and repeat from step 3 or 4 to 8 untill there are no more islands in temp layer and temp layer is fully transparent (mask layer is fully black).

As I said I'm no programmer so I hope someone will make this or point me to script that already does this, I haven't found one on the internet, only for photoshop but I don't have photoshop.
Here's link for photoshop version: https://graphicdesign.stackexchange.com/...yers-batch

Thanks in advance
Reply


Messages In This Thread
Searching for python script islands to layers - by mich_lloid - 01-22-2018, 03:10 PM

Forum Jump: