| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 4,944
» Latest member: Nafeesa
» Forum threads: 7,703
» Forum posts: 41,887
Full Statistics
|
|
|
| Problem with Gimp 3 Python plug-in color_argument |
|
Posted by: Volker - Yesterday, 05:51 PM - Forum: Scripting questions
- Replies (4)
|
 |
I try to migrate my Python plug-in to decorate a jpeg photo with margin, border and description from Gimp 2 to Gimp 3.
it works as intended as long as I don't add a color-argument. What is wrong with this code?
Code:
import sys
import os
from glob import glob
import gi
gi.require_version('Gimp', '3.0')
from gi.repository import Gimp
gi.require_version('GimpUi', '3.0')
from gi.repository import GimpUi
from gi.repository import GObject
from gi.repository import GLib
#from gi.repository import Gtk
from gi.repository import Gio
from gi.repository import Gegl
...
class MarginBorder(Gimp.PlugIn):
def do_query_procedures(self):
return [plugInMBProc]
def do_create_procedure(self, name):
procedure = None
if name == plugInMBProc:
procedure = Gimp.ImageProcedure.new(self, name,
Gimp.PDBProcType.PLUGIN,
margin_border_run, None)
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.DRAWABLE |
Gimp.ProcedureSensitivityMask.NO_DRAWABLES)
procedure.set_menu_label("Rand und Rahmen")
procedure.set_attribution("Volker", "Volker Lenhardt", "2025")
procedure.add_menu_path("<Image>/Volker")
procedure.set_documentation("Volkers Rand, Rahmen und Bildtext",
"Fügt dem aktiven Bild die Dekorationsebenen "\
+ "Rand, Rahmen und Bildtext hinzu.",
None)
procedure.add_font_argument("font", # name
"Font", # nick
None, # blurb
True, # none_ok
Gimp.Font.get_by_name(
"URW Gothic L Book"), # default_value
False, # default_to_context
GObject.ParamFlags.READWRITE) # flags
procedure.add_string_argument("desc", # name
"Bildbeschreibung", # nick
None, # blurb
"Irgendwo", # value
GObject.ParamFlags.READWRITE) # flags
procedure.add_double_argument("marginRelation", # name
"Randbreite in Promille der größten Bildausdehnung", # nick
None, # blurb
0.0, # min
30.0, # max
9.0, # value
GObject.ParamFlags.READWRITE) # flags
procedure.add_double_argument("borderRelation", # name
"Rahmenbreite in Promille der größten Bildausdehnung", # nick
None, # blurb
0.0, # min
10.0, # max
1.8, # value
GObject.ParamFlags.READWRITE) # flags
procedure.add_color_argument("borderColor", # name
"Rahmenfarbe", # nick
None, # blurb
False, # has_alpha
Gegl.Color.new("black"), # value
GObject.ParamFlags.READWRITE) # flags
return procedure
Gimp.main(MarginBorder.__gtype__, sys.argv)
If I omit the procedure.add_color_argument all is well, but with it the plug-in doesn't even show up in Gimp.
I can't find any code errors, or do you?
Thanks in advance for your help.
|
|
|
| New to Gimp |
|
Posted by: Bolothephotographer - 11-15-2025, 05:30 PM - Forum: General questions
- Replies (4)
|
 |
I'm an Affinity Photo user, or at least I have been for the past couple of years but they've recently made everything free and kinda ruined its attraction in the process.
You'd think that making the entire suite free would be an incredible gift and I suppose it is but I liked the fact that I owned it and therefore had some kind of rights and respect but their new terms and conditions show otherwise.
Anyway, all that aside. If i'm going to get something for free, I may as well go the Gimp route. It's a community thing and not a top down dictatorship like Canva is offering.
So I have a question. How easy is it to migrate from Affinity Photo to Gimp? What can I expect to discover in the process and what differences do I need to get my head around in order to understand this "alien" environment?
I was only ever really a basic user of Affinity Photo. I learnt what I needed to and would occasionally pick up new tricks and methods and was happy with my pace of learning. In fact, i'd not have bothered with looking elsewhere if it wasn't for Canva's ungainly "herding" methods.
One of my main interests has been making large panoramas. I understand that Gimp isn't really the right vehicle for that, so i'm also wanting to learn Hugin. Between the two, it should cover pretty much anything I want to do.
I don't like being corralled in a direction I don't want to take, so it's time to switch for good.
Thoughts and replies welcome. I haven't started the tutorial phase yet, well at least not in earnest so if anyone has any particularly useful recommendations, bring it on!
|
|
|
| GIMP 2.10 or 3 stuck loading with wifi |
|
Posted by: theelf - 11-15-2025, 12:10 AM - Forum: General questions
- Replies (5)
|
 |
Hi! Sorry for my English. I have a problem: OSX Ventura x86, GIMP 2.10 or 3, same problem. When loading, the GIMP splash screen gets stuck for about 1 minute, and then it loads successfully.
However, if I disable Wi-Fi before starting GIMP, it starts almost instantly. The same happens if GIMP is stuck on the splash screen and I disable Wi-Fi — it immediately continues loading.
I tried blocking GIMP with the firewall and with LuLu, but nothing changed.
For now, I made an Automator script that disconnects the network, opens GIMP, and reconnects it afterward, but I’m looking for a proper solution. Sometimes I’m downloading a file, forget to disable Wi-Fi, open GIMP, and my download gets interrupted.
Thanks a lot for any help!
|
|
|
| Random Clone |
|
Posted by: mrkid - 11-14-2025, 04:16 PM - Forum: General questions
- Replies (1)
|
 |
Hi! Im looking to know if there is a way to random clone an object. I mean, that the size, rotation, or some other properties could be randomized to avoid the mechanical looking. By example, i want to add apples to a tree. I want that apples vary slighty so it looks more real.
I remember to see something like that with Gimp brushes.
Any tip?
|
|
|
| Simulating paint my house |
|
Posted by: Felcas - 11-14-2025, 04:10 PM - Forum: General questions
- Replies (1)
|
 |
Hy I would like a help to simulate painting my house, using Gimp.
I want to paint my house, but I would like to see on screen how it will be with diferent paints on walls and other details.
I would like instruction on the easiest way to make selectrions or masks I don't know exactly, so I can define areas like walls for one color and others for details like floor or roof or columns, etc..
Then, I how can I apply paint in a way I can still see the texture behind to keep it photo realistic. How do I change the colors in a easy way. And how can I get it as close as possible to the real paint?
Thanks a lot
|
|
|
| "Mouseclick" is not recorded in Shortcuts |
|
Posted by: ESH - 11-12-2025, 11:18 PM - Forum: General questions
- Replies (4)
|
 |
Gimp 3 on Win 11.
I would like to use a shortcut (living in my muscle-memory from Photoshop) 'Ctrl+left mouseclick' on the layer mask icon (giving me the selection of the mask).
But when I try to input the combination - it is not recognized in the Configure Keyboard Shortcuts section.
At the same time I can have a mask shown with 'Alt+left mouseclick' on the layer mask icon. But this key-combination (though working) is not shown as a keyboard shortcut in the configure section ("Show Layer Masks" has the status "Disabled").
I guess 'Alt+left mouseclick' somehow was installed with the PhotoGimp plugin. I have searched for the plugin's key-definitions file to maybe be able to edit the short-cuts there. But I can't find it. And the right way would be to make these changes from the Configure Keyboard Shortcuts option.
How can I get Gimp to accept and show the mouse actions in the configure section?
|
|
|
|