Re: [Gimp-developer] Reading and saving of 3D MPO files in GIMP



Albrecht Lohöfener wrote
Hi,

I got the answer from Christian (the author of the MPO splitting software). He appreciates a MPO plugin for gimp and wrote: "So my understanding is that this does not make it incompatible with GPL v3 at all! But if it helps, I'm certainly happy to release mposplit under GPL additionally ..."
The result is that we can use the code in GIMP now!

How can we implement such an import filter? Is it more practical to add the MPO reading filter as an option to the JPEG filter or to create a new import filter that uses the JPEG source code from the JPEG filter?

Hi,

nice news and thanks, Christian!
My first thoughts are:

Create a new import filter for MPO files. JPEG doesn't depend on MPO and nobody knows whether MPO will always depend on JPEG only. In future the single image files in MPO could even be DNG files or whatever. These facts are reflected best by two separate import plug-ins.

Internally the import plug-in could work as follows:
1. Use MPOsplits code (by calling its functions) to extract the embedded JPEG data to new temporary JPEG files. 2. Use the existing import filters to load these JPEG files into two separate layers. The PDB API already has the function gimp-file-load-layer(s). 3. Give the layers meaningful names, for instance 'left eye view', 'right eye view' for MPO files with only two embedded JPEG files. If the MPO file includes more than two JPEG files (like panoramic images) simply number them sequentially: 'image #1' and so on.
4. Internally clean up: delete the temporary files.
The best way to use MPOsplit would be that its author Christian makes MPOsplit a library with a quite easy, elaborate and unalterable (or at least rarely altering) interface. This had the advantage that his software could have broader dissemination by reuse and GIMP could participate from MPOsplits evolution without much effort.

An MPO export filter could work like this:
1. For each single view: hide the unnecessary layers: for the edited left eye view hide the right eye's view layer and so on. Export the visible part of the result to a temporary JPEG file (using PDB APIs function file-jpeg-save) for each view. 2. Use MPOsplits code (by calling its functions) to merge the temporary JPEG files into a single MPO file.
3. Internally clean up: delete the temporary files.

In a second increment the import filter could be extended to load the MPO files thumbnail (APP1's thumbnail in the MPO file format spec) and show it in the 'Open image'-dialog.

A next step could be the proper handling of the MPO files' metadata (EXIF, IPTC, XMP and so on).

BTW: I don't want to arouse unfulfillable expectations, but this sounds like an easy task for a beginner or a GSoC student, if this feature request is of enough importance and there's yet time to fill with tasks before GSoC ends. Albrecht, could you please file an enhancement request in Bugzilla, if you haven't already done? This is the usuaI way after discussing it here and I think this helps you and our developers most for now.

Best regards,

grafxuser



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]