Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,783
» Latest member: ProstaPeak
» Forum threads: 7,596
» Forum posts: 41,399

Full Statistics

Latest Threads
files missing after insta...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: denzjos
1 hour ago
» Replies: 0
» Views: 29
Is there any version wher...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: rich2005
8 hours ago
» Replies: 1
» Views: 246
How do I uninstall GIMP 3...
Forum: Linux and other Unixen
Last Post: Ofnuts
9 hours ago
» Replies: 1
» Views: 107
AI Gimp Plugins
Forum: Watercooler
Last Post: merlilderman
Yesterday, 04:16 PM
» Replies: 21
» Views: 68,345
How to make a watermark o...
Forum: General questions
Last Post: kyolim
09-13-2025, 10:05 PM
» Replies: 5
» Views: 14,223
Linux command that does e...
Forum: Other graphics software
Last Post: rich2005
09-13-2025, 06:06 PM
» Replies: 1
» Views: 495
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: 406
Batch Color Saturation
Forum: Extending the GIMP
Last Post: rich2005
09-13-2025, 07:53 AM
» Replies: 15
» Views: 12,091
Photo play-time
Forum: Gallery
Last Post: Ofnuts
09-13-2025, 07:32 AM
» Replies: 24
» Views: 21,928
BIMP plugin for GIMP 3.10
Forum: Extending the GIMP
Last Post: firefly
09-12-2025, 11:53 PM
» Replies: 2
» Views: 759

 
  Searching for instruction
Posted by: Danbor - 02-29-2024, 11:26 PM - Forum: General questions - Replies (5)

Hello all. Looking for some specific schooling. I don't know if I have poor search skills, or if what I seek just doesn't exist.
   Being totally new to photo editing and new to Gimp, I am looking for some training in a specific area. So far without much luck. I have taken two Udemy courses already. The first, "Gimp 2.10 Masterclass: From beginner to pro photo editing", was good to get me familiar with concepts and the UI for Gimp. The second, "Gimp photo editing crash course" was pretty much useless for me.
   The first course focused on media design and the second focused on editing photos taken with a digital camera. Both useful and popular pursuits. However, of very little help for me. I am not creative and have no interest at all in pursuing any aspect of media or graphic design. I am not a picture taker so I have no digital photos to edit.
   What I do have are several hundred photos, from the early 1930's to the late 1990's that I want to scan and restore in digital form to share with family and comrades.
   So, does anyone know where a person can find a course of training that concentrates on using Gimp to repair and restore both color and black and white photographs?

Print this item

  Rectangle line thickness
Posted by: Peter Linu - 02-29-2024, 11:23 PM - Forum: General questions - Replies (1)

Hiyall,
Absolute Beginner here.

I want to create a rectangle around a piece of text and make the line a bit thicker.
I found the rectangle tool but can't find how to make it thicker.

Grateful for any advice.

Print this item

  Text Style
Posted by: petyusa - 02-29-2024, 10:43 PM - Forum: General questions - Replies (2)

Hi,

I've just started using GIMP a few weeks ago. I add a lot of text to images, but sometimes I have to change font size, style, etc. Is there a way, to set a preset for a givent text layer, and later just edit it, and it will update all text layers with the preset?

Print this item

  small plugin code help
Posted by: gimpygirl - 02-29-2024, 07:21 PM - Forum: Scripting questions - Replies (17)

Hi

I have this plugin that just runs some other scripts and plugins.

I want to add the first 2 comments lines. Can somebody tell me if this is possible and fill in the required code?
The plugin works but the 2 first comment lines I don't know how to code it.

First I want to add an alpha layer to my image.

Then I want to apply "select by color" tool on a specified pixel (X and Y value of the pixel) and delete the selection from  the whole image automatically? Is this possible using code?


Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from gimpfu import*


def test(timg, tdrawable):

#how to add alpha layer to my image?

#how to apply "select by color" tool on a specified pixel and delete the selection from  the whole image?

#determine the offset values manually
   pdb.gimp_drawable_offset(tdrawable, 0, 1, 18, -32)
   
   
#the image size is constant and 150x150 crops the border    
   pdb.gimp_image_crop(timg, 2400, 1200, 150, 150)
   
   
#guides using script-fu    
   pdb.script_fu_grid_guides(timg, 0, 150, 150, 1, 0)
   
   
#chop into 150x150 tiles    
   pdb.python_fu_ofn_guillotine_layer(timg, tdrawable)
   
   
#export all layers
   pdb.python_fu_ofn_export_layers(timg, os.path.dirname(timg.filename), "{numUp0}.png", "-", 0)
    
    
register(
       "test",
       "test",
       "test",
       "*",
       "*",
       "2024",
       "<Image>/Tools/test...",
       "*",
       [],
       [],
       test
       )

main()

Print this item

  plugin help: not appearing in gimp
Posted by: gimpygirl - 02-29-2024, 07:15 PM - Forum: Scripting questions - Replies (2)

Hi

What's wrong with this code and why does it not appear in GIMP?
What needs to be changed to make it work?


Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
from gimpfu import*



def test(timg, tdrawable):

   print_to_stderr("Hello World")

def print_to_stderr(*a):

   print(*a, file=sys.stderr)
   
   
   
register(
       "test",
       "test",
       "test",
       "test",
       "test",
       "2024",
       "<Image>/Tools/test...",
       "*",
       [],
       [],
       test
       )

main()

Print this item

  python_fu_ofn_export_layers question
Posted by: gimpygirl - 02-29-2024, 01:18 AM - Forum: Extending the GIMP - Replies (3)

Hi

I call python_fu_ofn_export_layers in my plugin (after some other plugins) and I would like this window not to appear. It can use the default settings.
Is this possible?

I ask this because I run my plugin on many files and they use the standard settings anyway. I don't want to click Export each time again for each file.



Attached Files Image(s)
   
Print this item

  dynamics not working in gimp-drawable-edit-stroke-item
Posted by: jonker - 02-28-2024, 09:53 PM - Forum: Scripting questions - Replies (6)

I want to draw perpendicular lines to a path within a selection. This can be done in gimp by selecting the right brush with the correct settings and then stroking a path with the the paintbrush or pencil. When I try to use the same settings in python-fu the stroked portion simply stays vertical. I have noted that during the manual stroke selection there is an "Emulate brush dynamics" option which is selected. I cannot find a similar setting in the python-fu api.
There might be some other issues in the script since this is my second python-fu script:

Code:
#!/usr/bin/env python

# GIMP Python plug-in template.

from gimpfu import *

def hay_selection(img, layer) :
    gimp.progress_init("Finding next tree ring " + layer.name + "...")

    # Set up an undo group, so the operation will be undone in one step.
    pdb.gimp_undo_push_group_start(img)

    # Do stuff here.
    pdb.gimp_context_push()
    # Base grey color
    pdb.gimp_context_set_foreground(gimpcolor.RGB(224,224,224))
    pdb.gimp_drawable_edit_fill(layer, FOREGROUND_FILL)
    # Path around selection
    pdb.plug_in_sel2path(img, layer)
    np = pdb.gimp_image_get_active_vectors(img)
    pdb.gimp_context_set_foreground(gimpcolor.RGB(0,0,0))
    pdb.gimp_context_set_paint_method("gimp-paintbrush")
    pdb.gimp_context_set_brush("2. Block 03")
    pdb.gimp_context_set_dynamics("Track Direction")
    pdb.gimp_context_set_brush_aspect_ratio(-20)
    pdb.gimp_context_set_brush_size(15)
    pdb.gimp_context_set_brush_angle(0)
    pdb.gimp_context_set_brush_spacing(10)
    pdb.gimp_context_set_brush_hardness(1)
    pdb.gimp_context_set_stroke_method(1)
    pdb.gimp_message("Dynamics: " + pdb.gimp_context_get_dynamics())
    pdb.gimp_drawable_edit_stroke_item(layer,np)
    # Fill interior with Hay Small
    pdb.gimp_context_set_pattern("Hay Small")
    pdb.gimp_selection_shrink(img,7)
    pdb.gimp_drawable_edit_fill(layer, PATTERN_FILL)    

    # Cleanup
#    pdb.gimp_image_remove_vectors(img,np)
    pdb.gimp_context_pop()

    # Close the undo group.
    pdb.gimp_undo_push_group_end(img)

register(
    "python_fu_hay_selection",
    "Selection to Hay",
    "Adds edge and fill to selection for hay.",
    "jonker",
    "jonker",
    "2024",
    "<Image>/Python-Fu/Selection to Hay...",
    "*",      # Alternately use RGB, RGB*, GRAY*, INDEXED etc.
    [],
    [],
    hay_selection)

main()

Print this item

  current folder in plugin
Posted by: gimpygirl - 02-28-2024, 06:46 PM - Forum: Scripting questions - Replies (14)

Hi

When I call an existing plugin installed in my own plugin, how can I specify the "current folder", which is the folder the gimp file is in?
See "???"


pdb.python_fu_ofn_export_layers(timg, "???", "{numUp0}.png", "-", 0)

Print this item

  python console
Posted by: gimpygirl - 02-28-2024, 05:29 PM - Forum: General questions - Replies (9)

Hi

What exactly can the python console do in gimp and for what do you use it?
Is there any docs?

A small example of its usage would be great!

Print this item

  procedure not found
Posted by: robgab - 02-28-2024, 05:11 PM - Forum: Scripting questions - Replies (1)

Good day to everybody...
I'm trying to call a G'MIC pluging from a pyhon-fu plugin with the following line:

pdb.gimp_run_procedure("script_fu_engrave", [image, layer])

The script I'm trying to call is:

(define (script_fu_engrave image drawable)
  (plug-in-gmic-qt RUN-NONINTERACTIVE image drawable 0 0 "fx_engrave 0.04,40,0,2,45,-1,1,0,10,1,0,0,0,1,0,50,50")
)
(script-fu-register "script-fu-engrave"
                    "<Image>/Filters/Custom/Engrave"
                    "Apply the Engrave filter"
                    "Your Name"
                    "Your Name"
                    "2024"
                    ""
                    SF-IMAGE "Image" 0
                    SF-DRAWABLE "Drawable" 0)

Script and plugin are into the right directories but the code return to me the following error:

Traceback (most recent call last):
  File "C:\Program Files\GIMP 2\lib\gimp\2.0\python/gimpfu.py", line 741, in response
    dialog.res = run_script(params)
  File "C:\Program Files\GIMP 2\lib\gimp\2.0\python/gimpfu.py", line 362, in run_script
    return apply(function, params)
  File "C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\GammaCorr1.py", line 66, in python_fu_custom_function
    pdb.gimp_run_procedure("script_fu_engrave", [image, layer])
error: procedure not found

I spent a full day to try to fix it and I am very frustrated... Is there someone who kindly help me?

Print this item