GNOME Bugzilla – Bug 521436
TIFF plug-in should set filename when importing a single image from a multi-image TIFF
Last modified: 2008-10-30 20:11:01 UTC
When I open a TIFF that has multiple images I lose the name of the file when doing a save as. I'd like for gimp to remeber the name and location of the file from which I just imported to use as a starting point when doing a save as. This would save time as in almost all cases of workflow I'm starting with the same file name in the same directory. When Gimp does in the default home directory with the name of "Untitled" it's not really helping me. I would prefer to have the original name there, or even blank as it saves me from deleting Untitled. I don't imagine people save their images as Untitled. Thank you
Works for me. Does this happen with all image files or only with multi-image TIFF files? What settings do you use to open the file?
I was importing only one of the layers (shown as "Page 1"). The name is preserved if I import all layers. I think the name should remain no matter which or how many layers you import as they're all from the same file. Thanks
Definitely not as you would then overwrite the file when saving that image again. But the TIFF plug-in should set a name based on the filename.
After looking at the code, I think it is best to do what the bug reporter suggested and always set the filename, even if only some images where selected for import: 2008-03-13 Sven Neumann <sven@gimp.org> * plug-ins/common/tiff-load.c (load_image): set a filename on the image, even when not all images are imported as layers (bug #521436).
Changed again in both branches to prevent data loss: 2008-03-13 Michael Natterer <mitch@gimp.org> * plug-ins/common/tiff-load.c (load_image): set the original filename only if all pages were loaded as layers; if a subset was loaded, set the filename to "<filename>.tiff-n-of-m-pages" so a simple "save" won't overwrite the original file without the user changing the filename explicitely.
I'm not sure I get the naming convention, but if it becomes image.tiff-1-of-3 it would be more annoying than say image-1of3.tiff as then you wouldn't have to change the name to get the extension right. Also, is it possible to also set the initial directory to be the same as the original TIFF? This would also save some work, and I'm not sure if the above patch does that. Thanks
The above patch sets the full filename. This includes the directory.
And the naming is good as it is. Since GIMP doesn't save multi-image TIFF files, opening them is always an import. After you have imported pages from a TIFF image as layers, you can't save this again as a TIFF file. With the current naming, the file will be saved as XCF, which is the best choice for a multi-layered image.