Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gimp-image-get-filename
#4
Hi PixLab,
 
I gave it a try on linux. Ran your script on image /home/teapot/test.xcf with export directory /home/teapot/Desktop/

With 'Keep the original name' un-ticked got newFileName /home/teapot/Desktop/IMAGE-0000001.webp which looks OK.

With 'Keep the original name' ticked got newFileName /home/teapot/Desktop//home/teapot/test.xcf.webp
This is not OK, the path is in 'twice' and there's a .xcf.

gimp-image-get-filename gives the whole path so /home/teapot/test.xcf
Whereas presumably what you want is gimp-image-get-name which will give test.xcf
Then you would need to strip off the .xcf

Also you should consider the case when the user has a brand new .xcf file that's never been saved.

Any reason why you aren't using python?
Reply


Messages In This Thread
gimp-image-get-filename - by PixLab - 10-07-2024, 07:36 AM
RE: gimp-image-get-filename - by Ofnuts - 10-07-2024, 11:01 PM
RE: gimp-image-get-filename - by PixLab - 10-08-2024, 04:00 AM
RE: gimp-image-get-filename - by Ofnuts - 10-08-2024, 07:22 AM
RE: gimp-image-get-filename - by teapot - 10-08-2024, 05:39 AM
RE: gimp-image-get-filename - by PixLab - 10-09-2024, 05:14 AM
RE: gimp-image-get-filename - by rich2005 - 10-09-2024, 08:37 AM
RE: gimp-image-get-filename - by PixLab - 10-09-2024, 01:14 PM
RE: gimp-image-get-filename - by teapot - 10-09-2024, 04:28 PM
RE: gimp-image-get-filename - by PixLab - 10-10-2024, 09:44 AM
RE: gimp-image-get-filename - by teapot - 10-10-2024, 06:48 PM
RE: gimp-image-get-filename - by PixLab - 10-30-2024, 06:37 AM

Forum Jump: