I recently installed Gimp 3.0.0-RC1 using the windows installer (on Win 11 - 64-Bit).
I am new to plug-in development, having only written one plug-in for Gimp 2.10.38 just last week. The 2.10 plug in works as I expect it to. In learning plug-in development, I discovered 3.0.0-RC1 and decided to install it and convert my plug-in to work with 3.0. To start, I attempted to create a simple, "Hello, World!" plug-in. Currently I have:
Code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GIMP - The GNU Image Manipulation Program
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
#
# gimp-tutorial-plug-in.py
# sample plug-in to illustrate the Python plug-in writing tutorial
# Copyright (C) 2023 Jacob Boerema
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
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
def do_create_procedure(self,name):
procedure = Gimp.ImageProcedure.new(self, name, Gimp.PDBProcType.PLUGIN,self.run,None)
procedure.set_image_types("*")
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.DRAWABLES | Gimp.ProcedureSensitivityMask.DRAWABLE)
procedure.set_menu_label("Animate Drawable Offsets...")
procedure.add_menu_path('<Image>/Filters/Animation/')
procedure.set_documentation("Animate Drawable Offsets","Animates offsets of active drawable in new image according to user defined settings.",name)
procedure.set_attribution("Jamie Miller","Jamie Miller","2024")
I can select the plug in from the menu just fine, but I am not seeing output in the Error Console (as I think that is where Gimp.message() outputs the message) and I am seeing the following error in the terminal window:
I have tried google the error messages but only found one thread regarding foggify that didn't seem to provide a relevant fix. I also read the thread regarding the "group-selected-by" plug-in and followed some suggestions in that thread to update my code but I am still seeing the error....
Any help to resolve this would be great....
(3 hours ago)JustJamie Wrote: UPDATED:
Code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GIMP - The GNU Image Manipulation Program
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
#
# gimp-tutorial-plug-in.py
# sample plug-in to illustrate the Python plug-in writing tutorial
# Copyright (C) 2023 Jacob Boerema
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
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
def do_create_procedure(self,name):
procedure = Gimp.ImageProcedure.new(self, name, Gimp.PDBProcType.PLUGIN,self.run,None)
procedure.set_image_types("*")
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.DRAWABLES | Gimp.ProcedureSensitivityMask.DRAWABLE)
procedure.set_menu_label("Animate Drawable Offsets...")
procedure.add_menu_path('<Image>/Filters/Animation/')
procedure.set_documentation("Animate Drawable Offsets","Animates offsets of active drawable in new image according to user defined settings.",name)
procedure.set_attribution("Jamie Miller","Jamie Miller","2024")
return procedure
##UPDATED function definition to remove 'run_data' parameter
def run(self, procedure, run_mode, image, n_drawables, drawables, config):
# function code goes here...
Gimp.message("Hello world!")
OK.....so, after re-reading the error message, I noticed it also included the line, " missing 1 required positional argument: 'run_data'"...removing this parameter from the definition for the run function allows the plug-in to operate and I can now see the "Hello, World!" message in the error console.....
I do not know what this parameter is for, or how removing it will affect the plug-in development. For now, I will keep researching what this parameter is used for and how it becomes populated with run_data.
I'm looking for volunteer(s) to run this test plug-in. The plug-in creates an image and selects a square polygon at the topleft of the image.
At least that what's it's supposed to do. However, the plug-in will crash while failing to select the polygon. The failure appears to be in the procedure: 'gimp-image-select-polygon'.
# Define a square of four points
# positioned at the topleft of the image.
config.set_property(
'segs', (0., 0., 250., 0., 250., 250., 250., 0.)
)
procedure.run(config)
I'm willing to report the bug to Gimp.org, but I believe it's a good idea to have some proof before doing so. There's also the possibility that I'm doing something wrong, and someone could point that out.
To install the plug-in copy the folder into a Gimp 3 plug-in folder. After Gimp is restarted, the plug-in will appear on the Gimp window menu under "Development".
Hi folks! I was creating a gif of a product by taking separate gifs and stills of different product views and then combining them into one gif using GIMP (manipulating these as separate layers). But four of the gifs (taken with the program LICEcap) would have really messed up colors when I combined it with the others. I attached a .png of a still from one of those gifs.
For these four gifs, I first grabbed the gif using LICEcap, then I uploaded it to Canva to put the gif on a static background, and then I took that and loaded it into GIMP with the intention of combining each with other static images/gifs.
I was able to solve this by doubling up the "background" layer on the very first gif this was happening with; literally just making a copy of it. The other three I have not been able to resolve. I played around with making/removing the "background" layer of the gif as an alpha channel (though I don't fully understand this concept), but this did nothing.
It's weird to me, because these gifs look totally normal on their own, and when I edit them on their own. It's only when I brought them into the final gif document to combine them that they got weird.
I ended up using an online program (ezgif.com) to fix the issue, because I was on a time crunch. When I loaded the gifs that were problematic in GIMP onto ezgif, they did not display weirdly. However, going forward I want to use GIMP!
We can do arrow to the right by doing 2 angle brackets to the right > > = ➤ , but we cannot do it the other side <<
For reference I wanted to do it on this post ➤ https://www.gimp-forum.net/Thread-Digika...8#pid40998 but nope no can do
Has Gimp changed the way layers work in 2.10.38? If so, can you point me to instructions? I've looked for hours and haven't seen anything that describes the behavior of layers I'm seeing. When a New Layer is (apparently) integrated with an existing layer how do I separate them?
Also, when I right click on an image layer all I see is New View, Raise View and Delete View. What happened to the right click menu option?
I'm assuming operator error could play a part but I don't know what it could be.
Thanks for your attention.
Since upgrading to Fedora 41 from 39, Gimp upgraded to 3.0rc1, I lost my arrows.
I have "arrow_V3.scm" from http://programmer97.byethost10.com/Files/arrow.zip copies into "/usr/share/gimp/3.0/scripts". When I select
-->Tools --> Arrow --> Arrow --> Okay, I get the following error:
Execution error for 'Arrow': Error eval: unbound variable gimp-image-get-selected-vectors
I am a new user of Gimp (2.10.38), but I have used several drawing programs including Sketchbook Pro. I replaced a failing 10-year-old MS Surface Pro (Windows 10) that I use with the stylus it came with. The stylus on the Surface Pro works as expected with Gimp, as well as all other programs that use a stylus.
The new computer is a Lenovo Yoga 9i 2-in-1 (Windows 11) that came with a Lenovo Slim Pen stylus (compatible with WGP, MPP2.0, AES2.0, and AES1.0 protocols). The stylus works perfectly with all other programs (apps) that I have tried so far, including Sketchbook Pro. It is not working with Gimp 2.10.38.
I have searched, viewed or read dozens of suggestions for making a stylus work with Gimp in the forums, YouTube, and other internet findings and have tried many of them. What I have been able to do so far is to create dots at the beginning of each attempted stroke of a brush (or pencil or pen). The dots are the same size no matter how much pressure I use to make the stroke, but at one point the dot sized were proportional to the pressure. The screenshot shows examples of four attempted strokes of the brush, and below those marks are strokes made using the mouse.
Any suggestions about how to get the stylus to work will be appreciated. Thanks!