GNOME Bugzilla – Bug 139354
Write a file plug-in library
Last modified: 2018-05-24 11:02:05 UTC
From the TODO.xml file: "Write a library with a bunch of common functions for file plug-ins to remove code duplication in these plug-ins." Should have functions to read/write several basic datatypes (char, int, long, etc.). Maybe also general routines to handle RLE.
This can be much more than a few routines for reading/writing basic datatypes. In fact, the file plug-ins are very different from all other plug-ins and we could even try to provide a separate plug-in template for file plug-ins. If we implement the features described in bug #119545 ("Merge Export features into the Save dialog") and/or in bug #56443 (EXIF metadata) and #94416 (XMP/IPTC metadata) then it would be useful to have common functions helping the file plug-ins to deal with these features. Two interesting tracking bugs are related to this: - bug #118191 "Improvements to load/save" - bug #118202 "Metadata improvements"
I agree that there could (and should) be much more functionality in such a library. The original entry in TODO.xml only talks about low-level routines. I also think that because of the planned short release cycle for 2.2 we could start with the straightforward stuff so we can clean-up those file plug-ins a bit.
Since we are approaching the end of the 2.2 development cycle, it looks as if this won't make it into the next release. For the future, we should definitely do this and allow to plug gnome-vfs into it. It would be sweet to be able to access network devices directly from within The GIMP.
I would like to set up such a library now, initially to hold exif-related code. The first question is what to call it. The possibilities that occur to me are "libgimpfile" and "libgimpfileutils".
The purpose of this library is not to swallow code like exif, but to provide an abstraction layer in the spirit of gnome-vfs/kio. Exif code doesn't belong there.
Possibly I'm just confused, but it seems to me that the original suggestion and comments 1 and 2 (and my question) are about one kind of library, while comments 3 and 5 are about a quite different type of library. But anyway, the practical question is, what is the right place to put utility code that will be used by several file plugins?
The right thing to do is to discuss this on the gimp-developer mailing-list.
We should probably let GVFS deal with the filesytem abstraction. But it would still be nice if we had a better API for file plug-ins. This would help for example with requests such as bug #434025. I am not sure, should we close this bug as WONTFIX or is there still a need for a file plug-in library as soon as the filesystem operations are abstracted away by GVFS?
*** Bug 463154 has been marked as a duplicate of this bug. ***
-- 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/71.