GNOME Bugzilla – Bug 158192
add thumbnail loader for TIFF images
Last modified: 2018-05-24 11:16:41 UTC
A recent addition to the GIMP 2.2 API allows plug-ins to register an additional procedure to give access to a thumbnail embedded in an image file. The TIFF format allows for such thumbnails so it would be nice if the TIFF plug-in would provide this functionality.
I had a closer look at the TIFF spec and unless I missed something, the TIFF 6.0 spec doesn't define thumbnails in TIFF files. I have come across two other links though: - http://www.die.net/doc/linux/man/man1/thumbnail.1.html describes a tool that creates thumbnails using a SubIFD tag (#330). This is described in more detail at http://www.awaresystems.be/imaging/tiff/tifftags/subifds.html. - http://www.awaresystems.be/imaging/tiff/tifftags/photoshop.html describes an extension to the TIFF format that is used by Photoshop. The data seems to be in the same format as used in the PSD format (see bug #158234).
I recently had occasion to use PS on a Mac (not sure what version, but recent), and found that when I saved an image in TIFF format and then opened it later in GIMP, the thumbnail showed up as a separate tiny layer.
The thumbnail is most probably stored as a separate image in a TIFF image directory then. That isn't really what image directories were designed for though and I would prefer that we use the SubIFD tag as described above.
Bumping to Future because this is not a blocker for 2.4.
Gimp-2.6 still reads TIFF thumbnail layers as if they were corrupt. I extracted the thumbnails using other software like exiftool and they are fine, so its a Gimp bug. The TIFF/EP spec describes them. It would also be good if Gimp didn't automaticall suffix the filename with "-1-of-2-pages". It's a pain having to remove this from the filename of every thumbnailed TIFF image I edit. showFoto (from digiKam) is an example of a program that saves these thumbnails.
Please do not mix different issues in one bug report.
This should now be easy to implement using gimp_image_metadata_load_thumbnail(), setting milestone to perhaps attract some attention.
I would love to take this quest. Im new to open source and "how all this works". I've subscribed to https://mail.gnome.org/mailman/listinfo/gimp-developer-list for more information. If there is anything else I should know please email me michal.g.buras at gmail.com. I want to get started as soon as possible.
In plug-ins/common, grep for gimp_register_thumbnail_loader() and deduce what needs to be done in the tiff plug-in.
i ran i little problem while compiling gimp sources on fedora 19 KDE, some of the dependencies form native fedora repos are outdated, ill probably figure that out in few days (due to beeing a student in the middle of semester) , and give you some serious feedback in the end of the week.
kk copiled, found the method you mentioned above, wroking on it. could anyone supply me with a valid tiff image with embedded SubIFD thumbnail? the only one I could produce on my linux was the one from gimp, and had to make it from jpg with thumb and then export to tiff.
tried to use thumbnail from tifflibrary to create one but it writes only 8byte header without any data, so i im kind of stuck without a good example of a tiff file with a thumb. i could create one from scratch,but i need some things explained. Do the 2 first bytes of IFD contain number of entires (tags with values) without the last entry which is the next IFD offset? Do entries need to be in ascending order, with next IFD OFFSET at the end? So Im supposed to put a subifd tag in the IFD pointing to IFD containing thumb and that will be a proper tiff image ?
From your comments it looks like you are the most competent guy in this area now, don't expect much explanation :) Also, I noticed that we seem to write EXIF-only thumbnails with the new metadata code, perhaps that needs to be changed too...
michal > this has been nearly 3 years, so is there a chance you are still around and that you finished (or nearly finished) a patch for this? :-)
No patch came in and that doesn't count as blocker. Let's just bump to 3.0 milestone. As usual: if someone wants to push the feature, patches are welcome and would be integrated for 2.10 if they come on time.
-- 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/100.