Scheme Script (Selecting,filling,duplicating,..)
Scheme Script (Selecting,filling,duplicating,..) | XarX | 21 Feb 18:44 |
- postings
- 1
Scheme Script (Selecting,filling,duplicating,..)
Hello gimp users,
I started creating a script which should do some actions for me, those that occur very often. But I'm totally new to scheme, so I have some problems finding and manipulating essential functions..
What the script should do:
0. Duplicate Input
--- Input = Layer 0, Duplicate = Layer 1
0. Make 1px border around the black schematic in Layer 1
1. Select via color (black) on Layer 0
2. Fill the selected area with a pattern (paper)
3. Duplicate edited Layer 0
--- Duplicate = Layer 2
4. Use gauss-smoothing (5px) on Layer 2 [not limited to the selection]
5. Duplicate Layer 2
---(New one is Layer3)
Layer order should be:
Layer 0 - Input with pattern
Layer 1 - Input with 1px black border
Layer 2 - Shadow 1
Layer 3 - Shadow 2
{
6. Merge everything together (Layer 0 to 3)
}
or
{
6. Merge Layer 2 and Layer 3
---(New Layer is Layer 2a)
7. Select on Layer 0 (The pixel in every corner)
8. Delete everything selected on Layer 2a
9. Merge Layer 0 to 2a together
}
Can someone help me with this? I gladly accept every help, so if you could point out some functions that I need or have a script that can do what I need - that'll be great!
I put an attachment on this post. There is the final result how it should look like. Background 01 and 02 (In the .xcf file) aren't in the script, as I don't want to Import any custom pictures.. that might be the next step, after this one works.
--- Some additional Info on the steps: 0. I want to have single line of pixel between the patterned input and the coming shadow. The input is a black schematic, some lines nothing more.
1. The input are black lines with a width of 5px. There is no background or whatsoever. Just black.
2. The selected are should be re-colored. And the basic pattern "Paper" does that perfectly. (I use the "Fill"-Tool and then "Pattern")
3. This one should be on top, as the other 2 Layers work as the "shadow".
4. That's the shadow of 3.
5. I want it to be a little bit darker, so duplicating is just fine.
6. Merge everything together is ok, but not the optimum.
other 6. Combine the two shadow layers to one.
7. I usually use the selection tool "Magic Wand / Fuzzy" on the four pixel discribed (Top left, top right, bottom left, bottom right)
8. This erases some parts of the shadow. Those that are "outside" of the input. --- This will always work, as long as the input is working as it should be..
9. Put everything together once more. I'll use the picture as a png later, therefor I don't need any more layers.
-
Example Picture
Example.xcf (130 KB)