On Mon, Apr 02, 2007 at 10:09:38PM -0700, Steven Howe wrote:
> I'm writing to this list a lot. Hope that's not a problem.
> I'd like to 'checkpoint' my work after each Python-Fu script is run. I
> building a image with multiple layers, using the Antiquing guide I found
> on the gimp site as a learning tool. Naturally I need store the image in
> the XCF file format.
> I think I want to use pdb.gimp_file_save(), I'd:
> 1) get the <path>/<filename> from the open active image (using what I
> don't know)
> 2) get the filename, (using os.path.basename)
> 3) carve off the extension, and add '.xcf' (using ckptName='%s.%s' % (
> fname[:fname.rfind('.')] , '.xcf' ) ... and
> use the *pdb.gimp_file_save()*.
> So the question is, how to get the full pathname for an image?
Use the "filename" attribute on the Image object. (It's just a wrapper
Gimp-user mailing list