Welcome, Guest |
You have to register before you can post on our site.
|
|
|
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?
|
|
|
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.
|
|
|
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.
|
|
|
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.
|
|
|
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
|
|
|
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.
|
|
|
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?
|
|
|
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
|
|
|
|