1

My Script works, but the exported file will be saved in my user folder. How can I automatically export the .png to the folder with my GIMP file?

(define (script-fu-biz-scale Image Layer Drawable)
    (gimp-layer-sca080le Layer 1920 1 TRUE)
    (file-png-save 1 Image Drawable "BizScale.png" "BizScale.png" 0 0 0 0 0 0 0)
)

(script-fu-register
    "script-fu-biz-scale"
    "<Image>/Filters/BizScale"
    "Scaling images automaticly"
    "Lukas"
    "Lukas"
    "12.12.2022"
    "RGB*"
    SF-IMAGE "Image" 0
    SF-DRAWABLE "Layer" 0
    SF-DRAWABLE "Drawable" 0
)
Lukas2002
  • 11
  • 3
  • Strange a script. Beyond the `gimp-layer-sca080le` (sic) the `file-png-save` will only export the `Drawable` (and not the whole image) so if it is not the same as `Layer` what is the point of scaling `Layer` and if it is, why two arguments for the same thing? – xenoid Dec 12 '22 at 15:40

1 Answers1

0

You could use gimp-image-get-filename to get the filepath of your original image, strip off the filename and add the new file name.

paynekj
  • 323
  • 2
  • 5
  • Thanks for your answer. I am new in coding and I only need to write this one skript. I need an example for exporting an image to a specified location. How can I do this? – Lukas2002 Jan 24 '23 at 09:24