Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
Is there any version wher...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: HavingTooMuchFun
Yesterday, 01:57 PM
» Replies: 0
» Views: 137
|
How to make a watermark o...
Forum: General questions
Last Post: kyolim
09-13-2025, 10:05 PM
» Replies: 5
» Views: 14,104
|
Linux command that does e...
Forum: Other graphics software
Last Post: rich2005
09-13-2025, 06:06 PM
» Replies: 1
» Views: 421
|
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: 349
|
Batch Color Saturation
Forum: Extending the GIMP
Last Post: rich2005
09-13-2025, 07:53 AM
» Replies: 15
» Views: 11,995
|
Photo play-time
Forum: Gallery
Last Post: Ofnuts
09-13-2025, 07:32 AM
» Replies: 24
» Views: 21,836
|
BIMP plugin for GIMP 3.10
Forum: Extending the GIMP
Last Post: firefly
09-12-2025, 11:53 PM
» Replies: 2
» Views: 697
|
pl_stroke_arrows GIMP 3.0...
Forum: Extending the GIMP
Last Post: Scallact
09-12-2025, 04:03 PM
» Replies: 0
» Views: 348
|
How do you make text circ...
Forum: General questions
Last Post: rich2005
09-12-2025, 07:18 AM
» Replies: 12
» Views: 3,443
|
New Install, Black Screen...
Forum: OSX
Last Post: akhrameev
09-11-2025, 02:32 PM
» Replies: 3
» Views: 3,109
|
|
|
Problems file-png-save-defaults |
Posted by: Petequero - 05-18-2018, 11:33 PM - Forum: Extending the GIMP
- Replies (1)
|
 |
Hello guys,
I am new here, and I wrote my first script-fu.
Unfortunately, it does not work (yet )
My script is about resizing png images, and then save them.
The script seems to be working for the resizing.
However, I don't manage to save the new pics.
I am working on windows 10 with GIMP 2.10.
My code is below.
Any feedback would be appraciated 
Code:
(script-fu-register
"script-fu-resize-theimages" ;Nom de la fonction (console)
"Redim" ;Nom du sous menu dans l'onglet /File/Create/Redimensionnement Image
"Redimensionne tes images png de la taille\
que tu veux, et avec l'interpolation\
que tu veux. Trop cool isn't it ?" ;description
"Dav The Crouch, allias la classique" ;author
"copyright the GIMP Documentation Team" ;copyright notice
"Pour entrer dans l'histoire : Mai 18, 2018" ;date created
"" ;image type that the script works on
SF-DIRNAME "Chemin source" ""
SF-ENUM "Interpolation" '("InterpolationType" "linear") ; Menu déroulant avec une interpolation à choisir
SF-VALUE "Width" "30" ; Menu à trou : Entré de la largeur finale de l'image
SF-VALUE "Height" "30" ; Menu à trou : Entré de la largeur finale de l'image
SF-DIRNAME "Chemin cible" ""
)
(script-fu-menu-register "script-fu-resize-theimages" "<Image>/File/Create/Redimentionnement Image") ; create a menu
(define (script-fu-resize-theimages sourcepath inInterpol inWidth inHeight destinationPath); On défini une fonction d'entrée qui prend les 3 paramètres du menu défini plus haut
(let*
(
; sélectionner le dossier à traiter avec SF-DIRNAME
; on chope tout les noms de chemin et les noms des images et on en fait une liste. Exemple :
; C:/Users\\ADOM.png" "C:/Users\\ADOM_grisée.png" ect...
(filelist (cadr (file-glob (string-append sourcepath "\\*.png") 1)))
)
; On prend donc les noms de la liste un par un, tant qu'il y en a
(while (not (null? filelist)) ;2 fonctions, une qui resize et sauvegarde, l'autre qui met à jour la liste-compteur (filelist)
(let*
(
; on prend le premier chemin associer à la première image
(first-filename (car filelist))
; On définit la variable image (pour les fonctions)
(image (car (gimp-file-load RUN-NONINTERACTIVE first-filename first-filename)))
; On définit de la variable drawable
(drawable (car (gimp-image-get-active-drawable image)))
; On reconstruit le nom : chemin/image.png
(outputfilename
(string-append ;On concatene :
(string-append destinationPath "/") ;chemin/
(cadr (strbreakup first-filename "\\")) ;image.png
)
)
)
; On défini l'interpolation
(gimp-context-set-interpolation inInterpol)
; Et finalement on lance le redimensionnement
(gimp-image-scale image inWidth inHeight)
;sauvegarde de l'image
(file-png-save-defaults RUN-NONINTERACTIVE image drawable outputfilename outputfilename)
;(file-png-save RUN-NONINTERACTIVE image drawable outputfilename outputfilename FALSE 9 TRUE FALSE FALSE TRUE TRUE)
;fermeture de l'image
(gimp-image-delete image)
)
; On supprime les "chemin/image.png" déjà fait
(set! filelist (cdr filelist))
)
)
)
Thank you in advance for any comment.
David
|
|
|
Launcher for gimp |
Posted by: gimp-artist - 05-17-2018, 12:00 PM - Forum: General questions
- Replies (9)
|
 |
I have a launcher icon for gimp for my ubuntu system. One day I used script-fu windows in gimp. Then the launcher icon was overlapped together. That's all fine.
After the first use of script-fu windows in gimp, there is no turning back to normal gimp launcher icon. It indicates "script-fu" not gimp itself. So when I click the launcher gimp won't start, of course I restarted my pc.
I registered a new gimp launcher, but it doesn't resolve the issue.
What should I do to fix this unusual issue?
|
|
|
Some scripts not recognized |
Posted by: dhugg - 05-16-2018, 09:06 PM - Forum: Extending the GIMP
- Replies (1)
|
 |
hello,
having trouble with certain scripts:
gimp_spinning_cube_script_by_fence_post-d184gze.scm
spinning-cube.scm
added the script ; refreshed scripts and restarted gimp 2.8 ; verified it is there ; doesnt show up in the "filters>animations>" menu or anyplace else;
any ideas what i might be doing wrong, other scripts ok???
thanks dhugg
|
|
|
Export Quality |
Posted by: uchajk - 05-16-2018, 02:10 PM - Forum: General questions
- Replies (2)
|
 |
Hi,
is there a way to set export quality to .JPG to default value?
I know I can save default then load it, but I would like to minimize amount of clicks/keyboard strokes.
In other words, I would like to have export quality slider set to 70 every time I click export.
|
|
|
|