Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Jpeg file loaded with script-fu not considered imported
#1
Hi,

When I open a JPEG file with Gimp 2.10, either from the menu File/Open or with the command line "gimp file.jpg", the image is considered imported (this is in accordance with the spec), and there an entry "Overwrite file.jpg" available in the Menu entry (with the hint "Export the image back to the imported file in the import format").

But when I load the same JPEG file with script-fu:
Code:
(define (myload file)
    (let*
        ((image (car (gimp-file-load RUN-INTERACTIVE file file))))
        (gimp-display-new image)
    )
)
Code:
gimp -b '(myload "file.jpg")'

then the image is not considered imported: the Overwrite menu item is not available, the image name when trying to close Gimp is "file.jpg-1" instead of "[file] (imported)-1", and when choosing to export the proposed file name is file.png by default (thus PNG file).

This is annoying because instead of being able to save the result in 2 actions (click overwrite menu item + click export button), I now need 5 actions (click export menu item, change the file name extension or select the existing file, click export button, click replace button, click export button). I can mention that my actual script is more complex, performing some preprocessing, before leaving the hand to the user to perform manual operations and save (and the time saved by the automatic preprocessing is somewhat reduced by the extra steps for saving...).

I didn't find a way in script-fu functions to explicitly import the file, and I feel that the current behavior is not consistent with the specification aforementioned, Is it expected and wanted ? Should a file loaded like this considered imported, or should there be a way to make it considered as imported with script-fu ? Or did I miss something ?

Thanks
Reply


Messages In This Thread
Jpeg file loaded with script-fu not considered imported - by cyril42e - 09-01-2022, 04:25 PM

Forum Jump: