Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
files missing after insta...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: denzjos
Yesterday, 03:58 PM
» Replies: 4
» Views: 381
|
Simplifying a path
Forum: Extending the GIMP
Last Post: Infinimitsu
Yesterday, 01:34 PM
» Replies: 39
» Views: 35,147
|
Is there any version wher...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: HavingTooMuchFun
Yesterday, 08:24 AM
» Replies: 2
» Views: 535
|
.pcd files issue?
Forum: OSX
Last Post: rich2005
Yesterday, 07:49 AM
» Replies: 1
» Views: 218
|
How do I uninstall GIMP 3...
Forum: Linux and other Unixen
Last Post: Ofnuts
09-15-2025, 07:02 AM
» Replies: 1
» Views: 366
|
AI Gimp Plugins
Forum: Watercooler
Last Post: merlilderman
09-14-2025, 04:16 PM
» Replies: 21
» Views: 68,995
|
How to make a watermark o...
Forum: General questions
Last Post: kyolim
09-13-2025, 10:05 PM
» Replies: 5
» Views: 14,502
|
Linux command that does e...
Forum: Other graphics software
Last Post: rich2005
09-13-2025, 06:06 PM
» Replies: 1
» Views: 747
|
reliable Gimp 2.10.38 dow...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: denzjos
09-13-2025, 05:20 PM
» Replies: 2
» Views: 653
|
Batch Color Saturation
Forum: Extending the GIMP
Last Post: rich2005
09-13-2025, 07:53 AM
» Replies: 15
» Views: 12,342
|
|
|
displacement plugin |
Posted by: vivi-d - 01-10-2025, 07:43 PM - Forum: Extending the GIMP
- Replies (1)
|
 |
Hello, I'm trying to create a plugin that will move the selection as if it's 'displacing' pixels as it moves. More specifically, if moving one pixel to the right, it will take all the pixels just to the right of the selection and place them on the left side of the selection.
If I had a way to test if a certain pixel is inside the selection or not, I could hack something together. So far I haven't found a way to test pixels for whether they are selected or not.
What do you guys think?
|
|
|
Documentation |
Posted by: Deedolith - 01-08-2025, 11:16 PM - Forum: Extending the GIMP
- Replies (3)
|
 |
Hello,
I am looking for any Gimp 3 python API documentation link.
For now, I am mainly searching on Google, wich most of the time, yeld Gimp 2 API results (outdated), or C API (nice but translating from C to python is a PITA, too many trials and errors).
|
|
|
Plug-in help |
Posted by: Deedolith - 01-07-2025, 05:28 PM - Forum: Extending the GIMP
- Replies (12)
|
 |
Hello,
I am having an hard time writing my first plus-in in Python.
I wrote a simple "Hello World" plug-in.
It show up in the menus (so the do_create_procedure member function work as intended).
It show up in the python procedures browser (so the do_query_procedures member function work as intended).
But it does not produce anything in the errors window and that leave me completly clueless.
What did I do wrong ?
Here is the source code:
Code:
import sys
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 GLib
class Plugin (Gimp.PlugIn):
def do_query_procedures(self):
return [ "fl-plug-in-Hello-World" ]
def do_set_i18n (self, name):
return False
def do_create_procedure(self, name):
procedure = Gimp.ImageProcedure.new(self, name,
Gimp.PDBProcType.PLUGIN,
self.run, None)
procedure.set_image_types("*")
procedure.set_menu_label("Hello World Python plug-in")
procedure.add_menu_path('<Image>/Filters/My Scripts/')
procedure.set_documentation("Hello World",
"Python 3 plug-in for GIMP 3.0",
name)
procedure.set_attribution("Fabrice", "Lambert", "2025")
return procedure
def run(self, procedure, run_mode, image, n_drawables, drawables, config, run_data):
Gimp.message("Hello world!")
# do what you want to do, then, in case of success, return:
return procedure.new_return_values(Gimp.PDBStatusType.SUCCESS, GLib.Error())
Gimp.main(Plugin.__gtype__, sys.argv)
|
|
|
|