I have just started scripting in GIMP. I’m following a tutorial and below is my hello world script:
from gimpfu import *
register(
"python_fu_hello_world",
"Hello World image", "Create an image with user-passed string",
"Santosh Kumar", "Santosh Kumar", "2018",
"Hello world...",
"",
[
(PF_STRING, "string", "String", "Hello, World!"),
(PF_FONT, "font", "Font face", "Sans"),
(PF_SPINNER, "size", "Font size", 50, (1, 3000, 1)),
(PF_COLOR, "color", "Text color", (1.0, 1.0, 1.0)),
],
[],
hello_world, menu="<Image>/File/Create"
)
main()
def hello_world(initstr, font, size, color):
if font == "Comic Sans MS":
initstr = "Comic Sans? Really?"
img = gimp.Image(1, 1, RGB)
gimp.set_foreground(color)
layer = pdb.gimp_text_fontname(img, None, 0, 0, initstr, 10, True, size, PIXELS, font)
# resize the img to the width and height of text layer
img.resize(layer.width, layer.height, 0, 0)
gimp.Display(img)
hello_world("Hello, World!", "Comic Sans MS", 72, "#ffffff")
Well, I’m on Windows, with GIMP version 2.10.2, and I’m pushing this script to C:\Users\<my name>\AppData\Roaming\GIMP\2.10\plug-ins
.
I’m sure this plugin is loading at least. Because it shows up on the splash screen. I don’t know where do I find it. I expect it to be on Image menu, but it’s not there.
What wrong have I done?