After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739124 - Add TIFF support
Add TIFF support
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2014-10-24 12:50 UTC by Bastien Nocera
Modified: 2016-03-20 21:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a gegl:tiff-load operation (499.70 KB, patch)
2015-10-02 19:44 UTC, Martin Blanchard
none Details | Review
Add a gegl:tiff-save operation (16.75 KB, patch)
2015-10-02 20:46 UTC, Martin Blanchard
none Details | Review
Do not pass warning strings directly to printf function (4.76 KB, patch)
2016-03-20 21:06 UTC, Martin Blanchard
none Details | Review

Description Bastien Nocera 2014-10-24 12:50:47 UTC
Similarly to the JPEG and PNG loaders, gegl should support TIFF (including multi-page handling).
Comment 1 Martin Blanchard 2015-05-05 21:27:56 UTC
Started to write a TIFF loader. You'll find my branch here:

https://gitlab.com/tchaik/gegl/blob/tchaik/wip/tiff/operations/external/tiff-load.c

Code is inspired from GIMP's file-tiff-load.c and GdkPixbuf's io-tiff.c. Some more work needs to be done, of course (this is a work in progress), but basics are working. Early comments are welcome, I'm neither a GEGL nor a TIFF expert...
Comment 2 Øyvind Kolås (pippin) 2015-09-17 10:23:38 UTC
Assuming that it loads many TIFFs, and TIFFs behind a notoriously hard container format to get good coverage for - perhaps we should take what you currently have in your branch and add it to upstream?
Comment 3 Martin Blanchard 2015-09-20 16:55:51 UTC
Agreed, loader and saver are in quite a good shape now, but saver will required bug #752037 to be reviewed first.

Anyway, how should we proceed? Should I post patches here? Do you prefer to have everything squashed in one patch?
Comment 4 Jon Nordby 2015-09-30 14:14:54 UTC
One git-formatted patch for the loader and one for the saver would be great.

There should also be at least one composition test per op, so we are sure it continues to work (and on all platforms).
See for example https://github.com/GNOME/gegl/blob/master/tests/compositions/pnm-ascii-load.xml and the associated 'pnm-ascii-load.png' under https://github.com/GNOME/gegl/tree/master/tests/compositions/reference

When you've added the .xml 'make check' will run it, and write output to './tests/compositions/out/$name.png'. You manually verify that it looks correct, and then copy over to reference dir. Running test again should then pass.
Comment 5 Martin Blanchard 2015-10-02 19:44:03 UTC
Created attachment 312583 [details] [review]
Add a gegl:tiff-load operation

Here is for the loader, test file and resources have been included.
Comment 6 Martin Blanchard 2015-10-02 20:46:03 UTC
Created attachment 312584 [details] [review]
Add a gegl:tiff-save operation

And here is for the saver.
Comment 7 Øyvind Kolås (pippin) 2015-11-21 03:24:32 UTC
commit 319a91e3f09a58ed3fd42a71d256725f0efdd7b5
Author: Martin Blanchard <tchaik@gmx.com>
Date:   Fri Oct 2 22:38:58 2015 +0200

    tiff: Add a gegl:tiff-save operation
    
    New GIO based TIFF file saver using libtiff. Operation will try to
    preserve the original buffer's data as much as possible, avoiding
    conversions. Based on GIMP's file-tiff-save plugin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739124


commit 4a47d55d09c6d033ff62220c6c482f9f016f233c
Author: Øyvind Kolås <pippin@gimp.org>
Date:   Sat Nov 21 03:59:46 2015 +0100

    POTFILES: add tiff-load.c

commit ae739a08a9902a7d3b4c660c83ef5b2b1c170920
Author: Martin Blanchard <tchaik@gmx.com>
Date:   Fri Oct 2 21:38:44 2015 +0200

    tiff: Add a gegl:tiff-load operation
    
    New GIO based TIFF file loader using libtiff. Handles contiguous and
    separated planar configuration, integer and floating-point samples and
    various sample bit depth. Test file + resources are included. Based on
    GIMP's file-tiff-load plugin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739124
Comment 8 Martin Blanchard 2016-03-20 21:06:48 UTC
Created attachment 324388 [details] [review]
Do not pass warning strings directly to printf function
Comment 9 Øyvind Kolås (pippin) 2016-03-20 21:23:15 UTC
(In reply to Martin Blanchard from comment #8)
> Created attachment 324388 [details] [review] [review]
> Do not pass warning strings directly to printf function

pushed to git