| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,014
» Latest member: ymatecom
» Forum threads: 7,746
» Forum posts: 42,093
Full Statistics
|
| Latest Threads |
Preferences/Folders shows...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: programmer_ceds
1 hour ago
» Replies: 5
» Views: 2,966
|
y1mate- Master Youtube An...
Forum: Other graphics software
Last Post: rich2005
3 hours ago
» Replies: 1
» Views: 102
|
Problems with AppImages.
Forum: Installation and usage
Last Post: teapot
Yesterday, 07:45 PM
» Replies: 2
» Views: 326
|
Why am'I fighting with GI...
Forum: Linux and other Unixen
Last Post: NetWeeZurd
Yesterday, 01:44 AM
» Replies: 2
» Views: 183
|
Can tooltip display time ...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: NetWeeZurd
Yesterday, 01:40 AM
» Replies: 4
» Views: 1,312
|
Problem posting an update...
Forum: Gimp-Forum.net
Last Post: Scallact
12-21-2025, 10:19 PM
» Replies: 19
» Views: 984
|
Paint bucket acts "weird"
Forum: General questions
Last Post: PieterJW
12-21-2025, 06:59 PM
» Replies: 7
» Views: 419
|
Install gimp user manual ...
Forum: Linux and other Unixen
Last Post: rich2005
12-21-2025, 09:03 AM
» Replies: 1
» Views: 205
|
Very, very nice startup t...
Forum: General questions
Last Post: mrkid
12-18-2025, 04:37 PM
» Replies: 0
» Views: 191
|
Why does HTML/css scale i...
Forum: General questions
Last Post: Tas_mania
12-17-2025, 07:20 PM
» Replies: 1
» Views: 266
|
|
|
| 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.
|
|
|
|