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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,501
» Latest member: Tyroneemume
» Forum threads: 7,126
» Forum posts: 38,972

Full Statistics

Latest Threads
Does Windows 11 hide its ...
Forum: General questions
Last Post: gophersnake
1 hour ago
» Replies: 8
» Views: 229
Missing Development menu ...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
1 hour ago
» Replies: 1
» Views: 68
Love these euphemisms
Forum: Watercooler
Last Post: denzjos
2 hours ago
» Replies: 4
» Views: 152
ht set default compressio...
Forum: General questions
Last Post: Ofnuts
Yesterday, 09:05 AM
» Replies: 5
» Views: 233
Font manager not managing...
Forum: Other graphics software
Last Post: Tailbit
01-31-2025, 08:11 PM
» Replies: 17
» Views: 4,175
No layers saved in Gimp 3...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
01-31-2025, 09:17 AM
» Replies: 2
» Views: 161
TableGimper released
Forum: Extending the GIMP
Last Post: ChameleonScales
01-30-2025, 10:52 AM
» Replies: 6
» Views: 2,649
Policy change
Forum: Gimp-Forum.net
Last Post: rich2005
01-28-2025, 09:05 PM
» Replies: 5
» Views: 287
Gimp Text Tool writing i...
Forum: General questions
Last Post: daiappy
01-28-2025, 11:39 AM
» Replies: 3
» Views: 290
Quick Easy Batch Operatio...
Forum: General questions
Last Post: rich2005
01-28-2025, 08:57 AM
» Replies: 6
» Views: 376

 
  Crosshair Guides
Posted by: akovia - 02-05-2019, 01:52 AM - Forum: Extending the GIMP - No Replies

A feature that should have been in the core (IMHO) from the word go is center guides. aka "crosshairs"

I was watching the video about rotating using the measure tool here on the forums and it made me think how I would do it. I found this simple script years ago and can't imagine using gimp without it. It will drop 50% horizontal and 50% vertical guides on your current layer. It's nice that it goes by the layer and not image so it makes it easy to rotate objects and text on their center axis and not the center of the canvas size.

You can get center guides through all sorts of plugins, scripts, or even the menus, but if you bind this to a shortcut you are always just a key or key combo away from crosshair guides. I also use a shortcut to clear all guides so I can reuse my crosshairs easily when aligning multiple items. 





I do realize that I could have saved some steps by centering to the canvas first but wanted to show how to reuse the guides easily.



Attached Files
.zip   Gregs Crosshairs.scm.zip (Size: 588 bytes / Downloads: 523)
Print this item

Question Script-FU: Batch rotate script
Posted by: dnairb - 02-03-2019, 11:37 PM - Forum: Scripting questions - Replies (5)

I am trying to write a batch rotate script, to rotate a number of images by an angle which is passed to the script.
I have the following, which is successfully registered in Gimp:

Code:
(script-fu-register
  "script-fu-batch_arbitrary_rotate"
  "Batch Rotation"
  ""
  ""
  ""
  ""
  "*"
)

(script-fu-menu-register "script-fu-batch_arbitrary_rotate" "<Image>/Tools/My scripts")

(
define (script-fu-batch_arbitrary_rotate pattern inDegrees)
  (let*
    (
      (filelist (cadr (file-glob pattern 1)))
    )
    (while
      (not (null? filelist))
      (let*
        (
          (filename (car filelist))
          (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
          (radians ( / (* inDegrees 4 (atan 1.0)) 180)) ;converts angle <inDegrees> to radians
          (gimp-item-transform-rotate image radians FALSE 150 150)
          (drawable (car (gimp-image-get-active-layer image)))
          (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
        )
        (set! filelist (cdr filelist))
      )
    )
  )
)

This is called in terminal by (to rotate each image by 35 degrees and save):
Code:
gimp -i -b '(script-fu-batch_arbitrary_rotate "*.png" 35)' -b '(gimp-quit 0)'

The terminal output states: "batch command executed successfully", but the images are not rotated. The files' properties suggest that no operations were performed.

I have racked my brains over this; can anyone help with the above script?

Print this item

  Add new paint method ?
Posted by: Jack Parker - 02-03-2019, 10:48 PM - Forum: Scripting questions - Replies (14)

Is there a way (short of C code and recompiling GIMP) to add a custom paint-method?
I'd like to add a new painter to the list (gimp-context-list-paint-methods) 
So that (gimp-drawable-edit-stroke-selection drawable) will do a custom procedural edit to the pixels.

Print this item

  extend colormap in indexed pictures
Posted by: gizaha - 02-03-2019, 03:40 PM - Forum: Scripting questions - Replies (1)

Hello there. I have a problem that tortures me 2 days now. 
I want to extend the colormap at indexed pictures by one color with script fu.


;get colormap length from header
(set! colormap_length (car (gimp-image-get-colormap image)))     

;get colormap data from tail
(set! colormap (car (cdr (gimp-image-get-colormap image))))

;extend header
(set! colormap_length (+ colormap_length 3))      ;increaze by 3 bytes/1 color

;extend tail
;here, i want to make colormap:=colormap+"000000" thus extend the list

;set new colormap
(gimp-image-set-colormap image colormap_length colormap)

(Variables are defined ok)
I tried almost everythink while playing with let, set, list, cons car etc etc.
Thank you.

Print this item

  Avatar
Posted by: charlie84 - 02-03-2019, 02:00 PM - Forum: Gimp-Forum.net - Replies (2)

Hi, I tried to insert my avatar with dimensions smaller than 100x100 and less than 25Kb.

A message tells me that it has been accepted. Bat I do not see it on the forum near my nick name.

Print this item

  Why do people post more images in Winter?
Posted by: Ofnuts - 02-02-2019, 08:56 PM - Forum: Gimp-Forum.net - Replies (2)

[Image: WQEdWQu.png]

Print this item

  problem with set color to alpha
Posted by: rickk - 02-02-2019, 01:35 AM - Forum: General questions - Replies (13)

New to all of this, Perhaps I am trying to go about this the wrong way.....not sure.
But, for instance,  suppose I wanted to cut an image of somebody  out of picture "A", and insert it into an already existing image "B"

SO, I painstakingly draw a white area  all around the perimeter of the desired target image, then extend that white area sufficiently large that I can select and crop to a rectangular  image for use.
Then I review the image and find a color not in use in the  target image, say  HTML color h1cf905 for  example ....no sign of that color anywhere in the target image , and then change the white area surrounding the target to that color, and then set that color to alpha.


Hoping to paste that image, complete with the transparent surround, into the "B" image.
Except when I set the surround color to alpha, it's causing the colors in the target image to get all whacked out.  For instance  with the  color mentioned  set to alpha, everything is shifting into violet colors.

Almost seems like the "color to alpha" function isn't discriminating properly, and is perhaps shifting all greens to alpha?
Thanks in advance for pointing me in the right direction

Print this item

  Radius color to transparency overlay
Posted by: jayhova - 02-01-2019, 10:15 PM - Forum: General questions - Replies (2)

I'm trying to create a sort of overhead circular glow effect. Imagine looking down on a lamp from overhead and seeing a yellow or white glow that falls off with distance. I would like to lay this over an existing image of a map. I would the effect to be transparent Strongly colorizing the map at the center of the effect and falling off toward the edge of the effect like a radiant gradient. I'm far from a GIMP expert.

Print this item

  Script-Fu hung
Posted by: Ritergeek - 02-01-2019, 06:45 PM - Forum: Extending the GIMP - Replies (2)

I've been having a fine time fiddling around in GIMP 2.10.8 with various layer effects to get a feel for how they work. While I was setting up an inner shadow using Script-Fu, the options window vanished. I might have clicked something about color.

At that point I cpuld run other layer effects via Layer Effects, but when I tried to run the Clothify filter, I got an error message that "Script-Fu cannot process two scripts at the same time. You are already running the "Inner Shadow" script. This was obviously stuck inside GIMP. The file I used the script in had already been closed.

I finally solved this by saving the active file and restarting GIMP. Now everything is working fine and I cannot replicate the problem.

Any other suggestions for closing a stuck script without restarting GIMP should this happen again?

Print this item

  help-browser.exe Message Parse error......
Posted by: allenpitts - 02-01-2019, 04:01 PM - Forum: Installation and usage - Replies (1)

Hello Gimp Forum,

Just getting started with Gimp so need the Help button.
When I click on Help a message appears:


help-browser.exe Message Parse error in "https//docs.gimp.org/2.10/en/gimp-help.xml': 
GET request failed: WinHttp error: CANNOT CONNECT

How can to get rid of this error message and get to Help?

Thanks.

Allen in Dallas

Print this item