Commit ae739a08 authored by Martin Blanchard's avatar Martin Blanchard Committed by Øyvind "pippin" Kolås

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
parent a9f56120
......@@ -55,6 +55,7 @@ m4_define([pango_required_version], [0.0.0])
m4_define([pangocairo_required_version], [0.0.0])
m4_define([png_required_version], [0.0.0])
m4_define([sdl_required_version], [0.0.0])
m4_define([libtiff_required_version], [4.0.0])
m4_define([webp_required_version], [0.0.0])
m4_define([poly2tri-c_required_version], [0.0.0])
......@@ -1142,6 +1143,25 @@ AM_CONDITIONAL(HAVE_UMFPACK, test "x$have_umfpack" = "xyes")
AC_SUBST(UMFPACK_CFLAGS)
AC_SUBST(UMFPACK_LIBS)
###################
# Check for libtiff
###################
AC_ARG_WITH(libtiff, [ --without-libtiff build without libtiff support])
have_libtiff="no"
if test "x$with_libtiff" != "xno"; then
PKG_CHECK_MODULES(TIFF, libtiff-4 >= libtiff_required_version,
have_libtiff="yes",
have_libtiff="no (libtiff library not found)")
fi
AM_CONDITIONAL(HAVE_TIFF, test "$have_libtiff" = "yes")
AC_SUBST(TIFF_CFLAGS)
AC_SUBST(TIFF_LIBS)
################
# Check for webp
################
......@@ -1346,6 +1366,7 @@ Optional dependencies:
EXIV: $have_exiv2
gexiv2: $have_gexiv2
umfpack: $have_umfpack
TIFF $have_libtiff
webp: $have_webp
poly2tri-c: $have_p2tc
]);
......@@ -128,6 +128,13 @@ lcms_from_profile_la_SOURCES = lcms-from-profile.c
lcms_from_profile_la_LIBADD = $(op_libs) $(LCMS_LIBS)
lcms_from_profile_la_CFLAGS = $(AM_CFLAGS)
endif
if HAVE_TIFF
ops += tiff-load.la
tiff_load_la_SOURCES = tiff-load.c
tiff_load_la_LIBADD = $(op_libs) $(TIFF_LIBS)
tiff_load_la_CFLAGS = $(AM_CFLAGS) $(TIFF_CFLAGS)
endif
if HAVE_WEBP
ops += webp-load.la
......
This diff is collapsed.
......@@ -78,6 +78,7 @@ NO_OPENCL_TESTS = \
pnm-raw-load.xml \
pnm-ascii-load.xml \
jpg-load-datauri.xml \
tiff-load.xml \
tile.xml
# Conditional tests
......
<?xml version='1.0' encoding='UTF-8'?>
<gegl>
<node operation='gegl:over'>
<node operation='gegl:translate'>
<params>
<param name='x'>20.000000</param>
<param name='y'>20.000000</param>
</params>
</node>
<node operation='gegl:tiff-load'>
<params>
<param name='path'>data/gegl-8bit-4ch-assoc-contiguous.tif</param>
</params>
</node>
</node>
<node operation='gegl:over'>
<node operation='gegl:translate'>
<params>
<param name='x'>488.000000</param>
<param name='y'>20.000000</param>
</params>
</node>
<node operation='gegl:tiff-load'>
<params>
<param name='path'>data/gegl-8bit-4ch-assoc-separated.tif</param>
</params>
</node>
</node>
<node operation='gegl:over'>
<node operation='gegl:translate'>
<params>
<param name='x'>20.000000</param>
<param name='y'>190.000000</param>
</params>
</node>
<node operation='gegl:tiff-load'>
<params>
<param name='path'>data/gegl-8bit-4ch-unassoc-contiguous.tif</param>
</params>
</node>
</node>
<node operation='gegl:over'>
<node operation='gegl:translate'>
<params>
<param name='x'>488.000000</param>
<param name='y'>190.000000</param>
</params>
</node>
<node operation='gegl:tiff-load'>
<params>
<param name='path'>data/gegl-16bit-float-4ch-assoc-contiguous.tif</param>
</params>
</node>
</node>
<node operation='gegl:crop'>
<params>
<param name='width'>956</param>
<param name='height'>360</param>
</params>
</node>
<node operation='gegl:checkerboard'>
</node>
</gegl>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment