Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 5,671
» Latest member: Donaldfuh
» Forum threads: 7,206
» Forum posts: 39,328
Full Statistics
|
|
|
GEGL graph |
Posted by: Pocholo - 01-31-2022, 06:08 PM - Forum: Scripting questions
- Replies (2)
|
 |
I hope I get a fix using the "Gegl" command line pdb.python_gegl(img, wavesLayer, 'noise-solid x-size=16.00 y-size=16.00 detail=15 tileable=0 turbulent=0 seed=0 width=1920 height=1080') from one of the Gegl expert here.
When I use Gegl graph, the procedure work fine and it give me the Solid Noise...
(Click the link to see image)
https://imgur.com/a/kteCJwE
But when I run the plugin it doesn't give me the same result, it just give me the created white layer.
(Click the link to see image)
https://imgur.com/a/69ErYDl
As you see in the code, I used the "gegl Bump-map" (Line 75-76) and this one work with no problem.
But the "gegl Solid Noise" (Line100) there is no action.
Thank you in advance!
This is my plugin code:
Code:
1 When I use Gegl graph, the procedure work fine and it give me the Solid Noise...
2 https://imgur.com/a/kteCJwE
3
4 But when I run the plugin it doesn't give me the same result, it just give me the created white layer.
5 I used the "gegl_command.py" that is made up of paynekj's simpler version.
6
7 https://imgur.com/a/69ErYDl
8
9 #!/usr/bin/env python
10 # -*- coding: utf-8 -*-
11
12 # author: Pocholo
13 # date: 8/18/21
14
15 # Comments directed to http://gimpchat.com
16
17 # Installation:
18 # This script should be placed in the user plugin folder
19
20 # Copyright (C)
21
22 # This program is free software: you can redistribute it and/or modify
23 # it under the terms of the GNU General Public License as published by
24 # the Free Software Foundation, either version 3 of the License, or
25 # (at your option) any later version.
26
27 # This program is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 # GNU General Public License for more details.
31 #
32 # You should have received a copy of the GNU General Public License
33 # along with this program. If not, see <https://www.gnu.org/licenses/>.
34
35 from gimpfu import *
36 import os, sys,time
37 import gettext
38 gettext.install("gimp20", gimp.locale_directory, unicode=True)
39
40 def create_a_beautiful_moonlight_scene():
41
42 pdb.gimp_context_push()
43 pdb.gimp_context_set_defaults()
44
45 #Create the sky
46 img = pdb.gimp_image_new(1920, 1080, RGB)
47 Starslayer = pdb.gimp_layer_new(img, img.width, img.height, RGBA_IMAGE, "Small Stars", 100, LAYER_MODE_NORMAL)
48 pdb.gimp_image_insert_layer(img, Starslayer, None, 0)
49 pdb.gimp_layer_add_alpha(Starslayer)
50 pdb.gimp_context_set_foreground((0, 0, 0))
51 pdb.gimp_drawable_fill(Starslayer, FILL_FOREGROUND)
52
53 #Image process
54 pdb.gimp_display_new(img)
55
56 #Create the stars
57 pdb.plug_in_hsv_noise(img, Starslayer, 8, 0, 0, 255)
58 pdb.gimp_brightness_contrast(Starslayer, -80, 50)
59 pdb.plug_in_gauss(img, Starslayer, 0.50, 0.50, 1)
60 pdb.plug_in_sparkle(img, Starslayer, 0.001, 1.00, 20, 4, 15, 1.00, 0, 0, 0, FALSE, FALSE, FALSE, 0)
61
62 #Create the Moon
63 moonLayer = pdb.gimp_layer_new(img, img.width, img.height, RGBA_IMAGE, "Moon", 100, LAYER_MODE_NORMAL)
64 pdb.gimp_image_add_layer(img, moonLayer, 0)
65 pdb.gimp_drawable_fill(moonLayer, FILL_TRANSPARENT)
66 pdb.gimp_context_set_foreground("White")
67 pdb.gimp_image_select_ellipse(img, 2, 810, 75, 306, 306)
68 pdb.gimp_edit_bucket_fill(moonLayer, BUCKET_FILL_FG, LAYER_MODE_NORMAL, 100, 255, FALSE, 0, 0)
69 pdb.plug_in_solid_noise(img, moonLayer, FALSE, FALSE, 0, 15, 0.8, 0.8)
70 pdb.gimp_selection_none(img)
71
72 #Create a texture on the moon
73 pdb.gimp_file_save(img, moonLayer, "C:\\temp\\Moon.png", "Moon.png")
74 moonLayer=pdb.gimp_image_get_active_layer(img)
75 pdb.python_gegl(img, moonLayer,
76 'bump-map aux=[load path="C:\\temp\\Moon.png"] compensate=1 invert=0 tiled=0 azimuth=220 elevation=30 depth=7 offset-x=0 offset-y=0 waterlevel=1.00 ambient=1.00')
77 pdb.gimp_image_select_item(img, 2, moonLayer)
78 pdb.gimp_selection_shrink(img, 6)
79 pdb.gimp_selection_invert(img)
80 pdb.gimp_drawable_edit_clear(moonLayer)
81
82 #Moon glow
83 glowLayer = pdb.gimp_layer_new(img, img.width, img.height, RGBA_IMAGE, "Moon glow", 100, LAYER_MODE_NORMAL_LEGACY)
84 pdb.gimp_image_add_layer(img, glowLayer, 1)
85 pdb.gimp_drawable_fill(glowLayer, FILL_TRANSPARENT)
86 pdb.gimp_context_set_foreground("White")
87 pdb.gimp_image_select_item(img, 2, moonLayer)
88 pdb.gimp_edit_bucket_fill(glowLayer, BUCKET_FILL_FG, LAYER_MODE_NORMAL, 100, 255, FALSE, 0, 0)
89 pdb.gimp_selection_none(img)
90 pdb.plug_in_gauss(img, glowLayer, 150, 150, 1) #method=1
91
92 #Create the sea
93 seaLayer = pdb.gimp_layer_new(img, img.width, img.height, RGBA_IMAGE, "Sea", 100, LAYER_MODE_NORMAL)
94 pdb.gimp_image_add_layer(img, seaLayer, 0)
95 pdb.gimp_context_set_foreground((3, 3, 5))
96 pdb.gimp_drawable_fill(seaLayer, FILL_FOREGROUND)
97 wavesLayer = pdb.gimp_layer_new(img, img.width, img.height, RGBA_IMAGE, "Waves", 100, LAYER_MODE_NORMAL)
98 pdb.gimp_image_add_layer(img, wavesLayer, 0)
99 pdb.gimp_drawable_fill(wavesLayer, FILL_WHITE)
100 pdb.python_gegl(img, wavesLayer, 'noise-solid x-size=16.00 y-size=16.00 detail=15 tileable=0 turbulent=0 seed=0 width=1920 height=1080')
101
102 #Make active the bottom layer and done
103 pdb.gimp_image_set_active_layer(img, Starslayer)
104
105 #Set gimp to default
106 pdb.gimp_context_pop()
107
108 register(
109 "create_a_beautiful_moonlight_scene",
110 "Creates Stars and a Moon",
111 "Creates Stars and a Beautiful Moonlight over a Sea",
112 "Pocholo",
113 "Pocholo",
114 "2021",
115 "Create a Beautiful Moonlight Scene",
116 "",
117 [
118 ],
119 [],
120 create_a_beautiful_moonlight_scene, menu="<Image>/Pocholo-scripts/Beautiful Moonlight scene",
121 domain=("gimp20", gimp.locale_directory))
122 main()
|
|
|
Inserting pdb.python_gegl command in my code |
Posted by: Pocholo - 01-29-2022, 11:09 PM - Forum: Scripting questions
- Replies (1)
|
 |
Hi guys! I'm trying to implement a Gegl command in my code and it's not working.
Using the Bump map filter I have this:
Code:
pdb.python_gegl(img, layer,
"bump-map type=linear compensate=True invert=False tiled=False azimuth=220 elevation=30 depth=20 offset-x=0 offset-y=0 waterlevel=1.00 ambient=1.00")
[/code]
What am I missing here? Thank you in advance!
|
|
|
Astronomy Tools Action Set |
Posted by: Cheesenacho - 01-29-2022, 09:07 PM - Forum: Extending the GIMP
- No Replies
|
 |
Hello,
I'm wondering if there is anyone that knows of a way to get Astronomy Tools Action Set to work with Gimp 2.10?
Or, if maybe there is a version of Gimp coming out that will allow the use of these tools?
Thanks,
CN
|
|
|
GIMP is exporting and opening really slow |
Posted by: tdart - 01-27-2022, 07:59 PM - Forum: General questions
- Replies (8)
|
 |
My GIMP all of a sudden has been exporting and opening files really slowly. Been like this for the past couple of days. Not sure why. Even the smallest file takes a couple of seconds. Everything else runs perfectly fine. I have no other issues with my CPU. Just the process of exporting and opening files in GIMP has changed drastically over the past couple of days. I uninstalled and reinstalled GIMP and still am having this issue.
I have seen others with this solution. Some seem to be able to fix it, but I don't see their solution or understand their solution. If someone knows the solution to this and could dumb it down for me. I would really appreciate it.
Currently running GIMP 2.10.30
Windows 10
|
|
|
Freezing and then crashing... |
Posted by: Douglas - 01-27-2022, 02:16 AM - Forum: General questions
- Replies (4)
|
 |
While using the airbrush, as I shift/left click to advance a line, Gimp freezes and then I have to manually crash the program, losing all my session's work. I tried waiting for it to come back, but I always have to start everything again. I use the paintbrush to avoid that. Gimp also freezes if I shake the mouse too rapidly while erasing. I can understand it's a constantly improving program, and I'm happy to be a user, so I do tolerate it to certain point. It is damn frustrating. I always have trepidation using Gimp for that reason, and I am constantly manually saving. Sometimes though, you just get focused on the task and forget to save for a while, and that's when it happens. I think the program is great, it's really helped me out working with .DDS files and creating Composites from the RGB channels, it's brilliant, but the freezing, ugh.... What can I do here besides avoid those features of the program? I have a I 7 with 16gig of RAM. The largest files were 8192 x 8192 and possibly 50 layers. But it's happend on smaller files too. Any suggestions? Thanks.
|
|
|
|