GNOME Bugzilla – Bug 335975
RFE: Save multilayer TIFFs without flattening
Last modified: 2018-05-24 11:47:46 UTC
Gimp can import multilayer TIFFs, such as those produced by Hugin's stitcher; the TIFF layers are imported as Gimp layers. However, after editing the layers' alpha masks (part of the Hugin workflow), Gimp will refuse to save the TIFF as a multilayer image. Multilayer images make it much easier to adjust layer masks; currently, after adjusting them, the layers have to be exported as individual TIFFs for final assembly.
We are supposed to be working with the other freesoftware applications to make a more modern image format to handle the things that TIFF does and more. Without a patch attached to this, I would like to see the developers who are involved, able and interested spend their time on that. http://create.freedesktop.org/ If you could consider what I have suggested here and provide a patch or close this bug yourself, it would be helpful to our bug managing tasks.
Why not just save as .xcf?
Because XCF isn't multilayer TIFF. The latter is usable with more apps, e.g. fax viewers. It's not the point of this enhancement request to find a workaround for one user, it is a reminder that it would be nice to have this in the tiff plug-in.
The specific application, for me, that uses multilayer tiffs is enblend. It also works using multiple tiffs with offsets; see bug 335615 for that issue. http://enblend.sf.net
You can look at the CinePaint code to see how it works close to the Gimp way of live. The plug-in is named tiff as well. http://www.CinePaint.org It was included in the plug-in version I once had made working for Gimp, but was rejected by some reasons. Maybe you can extract what is needed and provide a patch. I can send you the actual plug-in with further hints if you want.
I don't have programming knowledge, and that's why i can't provide a patch. But layered tiffs would be a nice cross platform format and it is supported by most applications out there. This would noticeable improve a production pipeline between multiple applications and operating systems. Would be nice if someone could take a look. Thanks in advance!
When I am coloring a piece of artwork, I like to do it in layers. Since this takes a long time, I would like to save my work so I can finish later. However, gimp will not let me save images with different layers and wants me to flatten the image. This is very frustrating, and I would like this problem to be fixed. -Sean
(In reply to comment #7) > gimp will not let me save images with different layers and wants me to flatten > the image. [...] For this, you should save your image as XCF, which is GIMP's native file format. But this bug is not about saving layers, it is about the TIFF file format and the support for multiple layers in that file format. Other software expects to work with multi-layer TIFF files and it would be nice if the GIMP tiff plug-in could support that. Volunteers are still welcome.
My most common need for multilayer TIFF is to use tiff2pdf with typically twenty to a hundred pages per document. I have also wanted to get multilayer images to other editors a number of times, and again TIFF would have been the solution if GIMP supported it.
If you want to try implementing this, have a look at the TIFF save plug-in http://git.gnome.org/browse/gimp/tree/plug-ins/common/file-tiff-save.c and the libtiff documentation, most likely this part: http://www.libtiff.org/libtiff.html#Dirs
*** Bug 637571 has been marked as a duplicate of this bug. ***
Created attachment 188010 [details] [review] Proposed fix Adds a checkbox to the tiff-save-image dialog. If checked, image layers will be saved as pages.
Created attachment 188062 [details] [review] Allows TIFF layer save modes: merge, flatten, save as pages I realized that NOT choosing to save as pages did not generate the same file as non-patched GIMP. This patch allows user to flatten or merge on export (or save layers as pages).
Created attachment 230971 [details] [review] save_as_pages tiff save mode for gimp 2.6 The same patch for gimp 2.6
Tested for gimp 2.6. Works well.
Hi Oleg! Was there anything wrong with the solution I submitted?
Hi, Dominic. Your solution is great! But your two patches are applied with errors to gimp 2.6 sources and i simply adopted it by hands for gimp 2.6 (Debian squeeze has gimp 2.6 in repository).
Dominic, Partha Bagchi in the mailing list said that: This patch will not work with the current master and if I am not mistaken, a cursory glance says that it won't save 16-bit tiffs and hence would have to be modified. But for me everything is good. May be you interest in this.
Why do you attach 2.6 patches here? We can only apply new features like this to git master.
Hi, Michael. Sorry. I just think that people find this page when searching about this problem and this patch is useful here.
Dominic and Oleg, We recently ported the TIFF plugin to GEGL which makes things like 16bit per channel loading/saving possible. Saving TIFF pages seems important to our users. Do you think you could give a shot to updating your patch so that we could include it in our further releases? Thanks!
Comment on attachment 188010 [details] [review] Proposed fix Per comment 21
Comment on attachment 230971 [details] [review] save_as_pages tiff save mode for gimp 2.6 Per comment 21
Comment on attachment 188062 [details] [review] Allows TIFF layer save modes: merge, flatten, save as pages Per comment 21
I think it's great that something has been done about this... but I have no idea to use what's been attached here. I believe a fundamental problem with my experience is that the reason I'm trying to do *exactly* what this 'patch' describes is because my job requires it. And this being a professional workstation, its OS is not up to me. Therefore I'm on windows and there is NOTHING that can be done about that. This also means that I'm a complete n00b when it comes to turning raw text files into results. What do I do to make this work? o_o I feel like I searched for water but found a tank of oxygen and two tanks of hydrogen here. A "How do I use these" button, or a FAQ for dumbasses like me who don't know this sort of this, would be really nice too, just saying...
Hello people! There is a cool patch on this bug report, but it doesn't apply to master (from what I understood, it never did since it was made for older version). That's quite sad. Anyone interested in TIFF support to work on this before we release 2.10? You can base your work from the proposed patch to
Argh sorry, posted too early. I was saying: You can base your work from the proposed patch which should make this contribution a lot easier (hence adding a "newcomers" keyword).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/188.