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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,570
» Latest member: archibael
» Forum threads: 7,447
» Forum posts: 40,703

Full Statistics

Latest Threads
Trying to append part of ...
Forum: General questions
Last Post: Denarius
Yesterday, 12:26 PM
» Replies: 5
» Views: 281
Can't see GIMP windows
Forum: Gimp 2.99 & Gimp 3.0
Last Post: Tas_mania
Yesterday, 08:57 AM
» Replies: 2
» Views: 164
clone tool
Forum: General questions
Last Post: sallyanne
Yesterday, 12:38 AM
» Replies: 6
» Views: 331
Missing fonts when export...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
06-29-2025, 07:48 AM
» Replies: 8
» Views: 424
Updating Python Scripts t...
Forum: Scripting questions
Last Post: Ofnuts
06-28-2025, 08:58 PM
» Replies: 1
» Views: 166
GIMP 3.0.4 Script-Fu Batc...
Forum: Extending the GIMP
Last Post: AgHornet
06-27-2025, 10:20 AM
» Replies: 0
» Views: 149
Technique for removing ov...
Forum: General questions
Last Post: denzjos
06-27-2025, 09:47 AM
» Replies: 12
» Views: 888
Windows save
Forum: General questions
Last Post: Tas_mania
06-26-2025, 10:30 PM
» Replies: 2
» Views: 261
unable to convert from rg...
Forum: General questions
Last Post: rich2005
06-26-2025, 11:42 AM
» Replies: 1
» Views: 224
How to fix halftones?
Forum: General questions
Last Post: rich2005
06-26-2025, 10:57 AM
» Replies: 2
» Views: 269

 
Question Newbie: Python script error
Posted by: mike_b - 10-07-2020, 05:27 PM - Forum: Extending the GIMP - Replies (1)

I am very new to the Python scripting in Gimp. I have used Gimp in the past for manipulating individual images, but now I have to run specific operations on hundreds of images. So I checked into the scripting options. I discarded Script-fu, as I am familiar with programming languages like C, C++, etc., but the Schemes thing is quite different. Python, on the other hand is similar enough.

So, to start out I looked at some sample scripts like this one:

Code:
import glob
source_folder = "c:/mysource_image_folder/" #type your folder inside the quotes - append the final "/"
dest_folder = "c:/destination_folder/"
for filename in glob.glob(source_folder  + "/*.png"):
   img = pdb.gimp_file_load(source_folder + filename, source_folder + filename)
   pdb.gimp_drawable_brightness_contrast(img.layers[0], 0.2, 0)
   pdb.gimp_file_save(img, img.layers[0], dest_folder + filename, dest_folder + filename)
   pdb.gimp_image_delete(img)  # drops the image from gimp memory

When I copy and paste that into the Python window, I get an error right away on the "import glob" line (I also get that error when I just type in "import glob"):

import glob
  File "<input>", line 1
    rt glob
          ^
SyntaxError: invalid syntax

So, obviously I am doing something wrong. Did I not install something right? I installed Python 3.7 (Win10), then reinstalled Gimp 2.10.20. Do I need to do something else?

And apologies if this is the wrong thread. Please point me to the right thread if so.

Thanks.

Print this item

  Easy cropping
Posted by: Ethel - 10-07-2020, 02:57 PM - Forum: General questions - Replies (6)

Hello,


What is the easiest way to explicitly crop from any edge? e.g. how to crop, say, 8px from the left, 10px from the right, and 12px from the bottom without using a mouse? A text box where I can enter the number or numbers I want would be good.

The instructions for changing a selection don't work for me. Can the same be done for a rectangular selection box using absolute or relative coordinates, i.e. a modal windows with four text boxes that dynamically shows the new selection rectangle on the image?


Thanks in advance


Ethel

Print this item

  Messing around with GEGL
Posted by: rich2005 - 10-07-2020, 01:26 PM - Forum: Gallery - Replies (1)

Not Gimp but it is GEGL A 50 second animation https://i.imgur.com/Y2Scdr8.mp4 700+ frames so a bit large for a gif Wink

One of the frames from the middle:

   

Print this item

Photo new download haunted by old problem's ghost
Posted by: mellyrn - 10-06-2020, 08:42 PM - Forum: General questions - Replies (2)

I had Gimp 2.10.12 on my machine. While working an image, my fingers slipped and suddenly my tools/dialog box was much different:  fewer tool icons were displayed, and the dialog box was completely unfamiliar:  the dialog box also did not change depending on which tool (of the fewer tools) I chose.  So while I can choose "text", I am, for example, unable to choose a  font, and while I can choose "brush", I am unable to choose the size of my brush. The new dialog box window(s?) contain nothing.

   

I had been working with black as my foreground color and red as the background. That is relevant; please bear with me.

I went into Windows (10; 64-bit) "Settings" and uninstalled Gimp 2.10.12.  I went to gimp.org and downloaded 2.10.20.  I opened the new Gimp -- and I have the same reduced tool menu, the same unreadable, unworkable dialog box(es) -- AND THE SAME COLORS, black (foreground) & red (background).

I uninstalled & downloaded again. Didn't help.

I ran CCleaner, complete with "wipe free space", restarted my computer and tried again.  Once again the new download displays the same abbreviated tool menu, the same lack of usable dialog for the tools, AND THE SAME COLORS.

??? It feels like the old, broken version is somehow "haunting" my machine & corrupting the new downloads....

Please note, in the image labeled "normal gimp" -- that's Gimp 2.8, which I have on an old machine, but the tool/dialog box looks much like what I *used* to have in 2.10.12, & what I expect to see:
   

Print this item

  Oversized window
Posted by: halligant - 10-05-2020, 07:12 PM - Forum: General questions - Replies (1)

Hello,
The gimp window fills the entire screen and I cannot access the unit or scale boxes at the bottom of the screen.
In addition the toolbox extends right down the screen and I cannot access the functions at the bottom.
Any help to resolve this issue would be gratefully received,
                                                                                           Yours,
                                                                                         halligant

Print this item

  Plugin-autotrace.py Ver 0.5
Posted by: denzjos - 10-05-2020, 09:32 AM - Forum: Extending the GIMP - Replies (15)

Anyone ever used this plugin? The one in the post (link here included) promise that it is working. I've tried to used it, placed the downloaded files in the /user/app/...but don't find the plugin in gimp (even with the plug-in browser). Any suggestions? Thanks in advance.
https://www.gimpscripts.net/search?updat...date=false
Look under : Plugin-autotrace.py Ver 0.5

Print this item

Video Extracting Speech Bubble/Ballon and Panel
Posted by: DRL - 10-03-2020, 04:51 PM - Forum: General questions - Replies (1)

Hi there,
I am a new member who just joins today. Perhaps somebody can help me please. I would like to automatically extract speech baloon/bubble and panel of a comic book. Example is given below. What would be the best technique in GIMP to do this please. Any help would be appreciated. Thank you.

[Image: clear.jpg]




Print this item

  Set the color to white, but not drawing white.
Posted by: Summoner99 - 10-03-2020, 04:28 AM - Forum: General questions - Replies (1)

This is bound to be a really simple problem. 
I downloaded an image. I needed to replace some things with white Problem is, when I open the color menu to select the color white, it doesn't actually draw the color white.
https://imgur.com/NN5R1gs
Here we see what the color menu option looks like, and the color it drew onto my image.
Thanks for your time.

Print this item

  Difficulty ending straight line tool
Posted by: Ps2Gimp - 10-03-2020, 02:27 AM - Forum: Older Gimp versions (2.8, 2.6....) - Replies (4)

Using pencil+left click drag to make straight lines. Doing a double left click to end line does not work, it remains in draw mode ?
Looking for quickest way.

Thanks

Print this item

  Is Gimpchat down again?
Posted by: Krikor - 10-02-2020, 09:30 PM - Forum: Watercooler - Replies (4)

After failing for the fourth time, I give up for today.

someone else in trouble trying to access GimpChat?

Translated:

Your connection is not private
Attackers may be trying to steal your information from gimpchat.com (for example, passwords, messages or credit cards). know more
NET :: ERR_CERT_AUTHORITY_INVALID

Help improve web security for everyone by sending Google URLs for some of the pages you’ve accessed, limited system information and some of the page’s content. privacy policy
[Image: KF8mUi5.png]

Print this item