From 5c1676dfe6d2f3c837a5e074117b45613fd29a72 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:30:19 +0200 Subject: Adding upstream version 2.10.34. Signed-off-by: Daniel Baumann --- plug-ins/file-raw/Makefile.am | 90 ++ plug-ins/file-raw/Makefile.in | 1220 ++++++++++++++++++++ .../file-raw/file-darktable-export-on-exit.lua | 88 ++ plug-ins/file-raw/file-darktable-get-size.lua | 21 + plug-ins/file-raw/file-darktable.c | 550 +++++++++ plug-ins/file-raw/file-raw-formats.h | 320 +++++ plug-ins/file-raw/file-raw-placeholder.c | 163 +++ plug-ins/file-raw/file-raw-utils.c | 153 +++ plug-ins/file-raw/file-raw-utils.h | 33 + plug-ins/file-raw/file-rawtherapee.c | 476 ++++++++ 10 files changed, 3114 insertions(+) create mode 100644 plug-ins/file-raw/Makefile.am create mode 100644 plug-ins/file-raw/Makefile.in create mode 100644 plug-ins/file-raw/file-darktable-export-on-exit.lua create mode 100644 plug-ins/file-raw/file-darktable-get-size.lua create mode 100644 plug-ins/file-raw/file-darktable.c create mode 100644 plug-ins/file-raw/file-raw-formats.h create mode 100644 plug-ins/file-raw/file-raw-placeholder.c create mode 100644 plug-ins/file-raw/file-raw-utils.c create mode 100644 plug-ins/file-raw/file-raw-utils.h create mode 100644 plug-ins/file-raw/file-rawtherapee.c (limited to 'plug-ins/file-raw') diff --git a/plug-ins/file-raw/Makefile.am b/plug-ins/file-raw/Makefile.am new file mode 100644 index 0000000..934ae61 --- /dev/null +++ b/plug-ins/file-raw/Makefile.am @@ -0,0 +1,90 @@ +## Process this file with automake to produce Makefile.in + +libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la +libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la +libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la +libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la + +filerawdatadir = $(gimpdatadir)/file-raw + +if OS_WIN32 +mwindows = -mwindows +endif + +# if HAVE_WINDRES +# include $(top_srcdir)/build/windows/gimprc-plug-ins.rule +# file_darktable_RC = file-darktable.rc.o +# file_rawtherapee_RC = file-rawtherapee.rc.o +# file_raw_placeholder_RC = file-raw-placeholder.rc.o +# endif + +AM_LDFLAGS = $(mwindows) + +dt_libexecdir = $(gimpplugindir)/plug-ins/file-darktable +rt_libexecdir = $(gimpplugindir)/plug-ins/file-rawtherapee +rp_libexecdir = $(gimpplugindir)/plug-ins/file-raw-placeholder + +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + -I$(includedir) \ + $(GTK_CFLAGS) \ + $(GEGL_CFLAGS) + +dt_libexec_PROGRAMS = file-darktable +rt_libexec_PROGRAMS = file-rawtherapee +rp_libexec_PROGRAMS = file-raw-placeholder + +file_darktable_SOURCES = \ + file-darktable.c \ + file-raw-formats.h \ + file-raw-utils.c \ + file-raw-utils.h + +file_rawtherapee_SOURCES = \ + file-rawtherapee.c \ + file-raw-formats.h \ + file-raw-utils.c \ + file-raw-utils.h + +file_raw_placeholder_SOURCES = \ + file-raw-formats.h \ + file-raw-placeholder.c + +file_darktable_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_darktable_RC) + +file_rawtherapee_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_rawtherapee_RC) + +file_raw_placeholder_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_raw_placeholder_RC) + +filerawdata_DATA = \ + file-darktable-export-on-exit.lua \ + file-darktable-get-size.lua + +EXTRA_DIST = $(filerawdata_DATA) diff --git a/plug-ins/file-raw/Makefile.in b/plug-ins/file-raw/Makefile.in new file mode 100644 index 0000000..5162ad1 --- /dev/null +++ b/plug-ins/file-raw/Makefile.in @@ -0,0 +1,1220 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +dt_libexec_PROGRAMS = file-darktable$(EXEEXT) +rt_libexec_PROGRAMS = file-rawtherapee$(EXEEXT) +rp_libexec_PROGRAMS = file-raw-placeholder$(EXEEXT) +subdir = plug-ins/file-raw +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4macros/alsa.m4 \ + $(top_srcdir)/m4macros/ax_compare_version.m4 \ + $(top_srcdir)/m4macros/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4macros/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4macros/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4macros/ax_prog_perl_version.m4 \ + $(top_srcdir)/m4macros/detectcflags.m4 \ + $(top_srcdir)/m4macros/pythondev.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(dt_libexecdir)" \ + "$(DESTDIR)$(rp_libexecdir)" "$(DESTDIR)$(rt_libexecdir)" \ + "$(DESTDIR)$(filerawdatadir)" +PROGRAMS = $(dt_libexec_PROGRAMS) $(rp_libexec_PROGRAMS) \ + $(rt_libexec_PROGRAMS) +am_file_darktable_OBJECTS = file-darktable.$(OBJEXT) \ + file-raw-utils.$(OBJEXT) +file_darktable_OBJECTS = $(am_file_darktable_OBJECTS) +am__DEPENDENCIES_1 = +file_darktable_DEPENDENCIES = $(libgimp) $(libgimpbase) \ + $(libgimpcolor) $(libgimpconfig) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_file_raw_placeholder_OBJECTS = file-raw-placeholder.$(OBJEXT) +file_raw_placeholder_OBJECTS = $(am_file_raw_placeholder_OBJECTS) +file_raw_placeholder_DEPENDENCIES = $(libgimp) $(libgimpbase) \ + $(libgimpcolor) $(libgimpconfig) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_file_rawtherapee_OBJECTS = file-rawtherapee.$(OBJEXT) \ + file-raw-utils.$(OBJEXT) +file_rawtherapee_OBJECTS = $(am_file_rawtherapee_OBJECTS) +file_rawtherapee_DEPENDENCIES = $(libgimp) $(libgimpbase) \ + $(libgimpcolor) $(libgimpconfig) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/file-darktable.Po \ + ./$(DEPDIR)/file-raw-placeholder.Po \ + ./$(DEPDIR)/file-raw-utils.Po ./$(DEPDIR)/file-rawtherapee.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(file_darktable_SOURCES) $(file_raw_placeholder_SOURCES) \ + $(file_rawtherapee_SOURCES) +DIST_SOURCES = $(file_darktable_SOURCES) \ + $(file_raw_placeholder_SOURCES) $(file_rawtherapee_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +DATA = $(filerawdata_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +AA_LIBS = @AA_LIBS@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALL_LINGUAS = @ALL_LINGUAS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPSTREAM_UTIL = @APPSTREAM_UTIL@ +AR = @AR@ +AS = @AS@ +ATK_CFLAGS = @ATK_CFLAGS@ +ATK_LIBS = @ATK_LIBS@ +ATK_REQUIRED_VERSION = @ATK_REQUIRED_VERSION@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BABL_CFLAGS = @BABL_CFLAGS@ +BABL_LIBS = @BABL_LIBS@ +BABL_REQUIRED_VERSION = @BABL_REQUIRED_VERSION@ +BUG_REPORT_URL = @BUG_REPORT_URL@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZIP2_LIBS = @BZIP2_LIBS@ +CAIRO_CFLAGS = @CAIRO_CFLAGS@ +CAIRO_LIBS = @CAIRO_LIBS@ +CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@ +CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@ +CAIRO_PDF_REQUIRED_VERSION = @CAIRO_PDF_REQUIRED_VERSION@ +CAIRO_REQUIRED_VERSION = @CAIRO_REQUIRED_VERSION@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CC_VERSION = @CC_VERSION@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_DATADIR = @DESKTOP_DATADIR@ +DESKTOP_FILE_VALIDATE = @DESKTOP_FILE_VALIDATE@ +DLLTOOL = @DLLTOOL@ +DOC_SHOOTER = @DOC_SHOOTER@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_AA = @FILE_AA@ +FILE_EXR = @FILE_EXR@ +FILE_HEIF = @FILE_HEIF@ +FILE_JP2_LOAD = @FILE_JP2_LOAD@ +FILE_JPEGXL = @FILE_JPEGXL@ +FILE_MNG = @FILE_MNG@ +FILE_PDF_SAVE = @FILE_PDF_SAVE@ +FILE_PS = @FILE_PS@ +FILE_WMF = @FILE_WMF@ +FILE_XMC = @FILE_XMC@ +FILE_XPM = @FILE_XPM@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FONTCONFIG_REQUIRED_VERSION = @FONTCONFIG_REQUIRED_VERSION@ +FREETYPE2_REQUIRED_VERSION = @FREETYPE2_REQUIRED_VERSION@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GDK_PIXBUF_REQUIRED_VERSION = @GDK_PIXBUF_REQUIRED_VERSION@ +GEGL = @GEGL@ +GEGL_CFLAGS = @GEGL_CFLAGS@ +GEGL_LIBS = @GEGL_LIBS@ +GEGL_MAJOR_MINOR_VERSION = @GEGL_MAJOR_MINOR_VERSION@ +GEGL_REQUIRED_VERSION = @GEGL_REQUIRED_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GEXIV2_CFLAGS = @GEXIV2_CFLAGS@ +GEXIV2_LIBS = @GEXIV2_LIBS@ +GEXIV2_REQUIRED_VERSION = @GEXIV2_REQUIRED_VERSION@ +GIMP_API_VERSION = @GIMP_API_VERSION@ +GIMP_APP_VERSION = @GIMP_APP_VERSION@ +GIMP_BINARY_AGE = @GIMP_BINARY_AGE@ +GIMP_COMMAND = @GIMP_COMMAND@ +GIMP_DATA_VERSION = @GIMP_DATA_VERSION@ +GIMP_FULL_NAME = @GIMP_FULL_NAME@ +GIMP_INTERFACE_AGE = @GIMP_INTERFACE_AGE@ +GIMP_MAJOR_VERSION = @GIMP_MAJOR_VERSION@ +GIMP_MICRO_VERSION = @GIMP_MICRO_VERSION@ +GIMP_MINOR_VERSION = @GIMP_MINOR_VERSION@ +GIMP_MKENUMS = @GIMP_MKENUMS@ +GIMP_MODULES = @GIMP_MODULES@ +GIMP_PACKAGE_REVISION = @GIMP_PACKAGE_REVISION@ +GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@ +GIMP_PLUGINS = @GIMP_PLUGINS@ +GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@ +GIMP_REAL_VERSION = @GIMP_REAL_VERSION@ +GIMP_RELEASE = @GIMP_RELEASE@ +GIMP_SYSCONF_VERSION = @GIMP_SYSCONF_VERSION@ +GIMP_TOOL_VERSION = @GIMP_TOOL_VERSION@ +GIMP_UNSTABLE = @GIMP_UNSTABLE@ +GIMP_USER_VERSION = @GIMP_USER_VERSION@ +GIMP_VERSION = @GIMP_VERSION@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ +GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ +GIO_WINDOWS_CFLAGS = @GIO_WINDOWS_CFLAGS@ +GIO_WINDOWS_LIBS = @GIO_WINDOWS_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@ +GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@ +GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GS_LIBS = @GS_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ +GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ +GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@ +GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ +HAVE_CXX14 = @HAVE_CXX14@ +HAVE_FINITE = @HAVE_FINITE@ +HAVE_ISFINITE = @HAVE_ISFINITE@ +HAVE_VFORK = @HAVE_VFORK@ +HOST_GLIB_COMPILE_RESOURCES = @HOST_GLIB_COMPILE_RESOURCES@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_REQUIRED_VERSION = @INTLTOOL_REQUIRED_VERSION@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@ +ISO_CODES_LOCATION = @ISO_CODES_LOCATION@ +JPEG_LIBS = @JPEG_LIBS@ +JSON_GLIB_CFLAGS = @JSON_GLIB_CFLAGS@ +JSON_GLIB_LIBS = @JSON_GLIB_LIBS@ +JXL_CFLAGS = @JXL_CFLAGS@ +JXL_LIBS = @JXL_LIBS@ +JXL_THREADS_CFLAGS = @JXL_THREADS_CFLAGS@ +JXL_THREADS_LIBS = @JXL_THREADS_LIBS@ +LCMS_CFLAGS = @LCMS_CFLAGS@ +LCMS_LIBS = @LCMS_LIBS@ +LCMS_REQUIRED_VERSION = @LCMS_REQUIRED_VERSION@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBBACKTRACE_LIBS = @LIBBACKTRACE_LIBS@ +LIBHEIF_CFLAGS = @LIBHEIF_CFLAGS@ +LIBHEIF_LIBS = @LIBHEIF_LIBS@ +LIBHEIF_REQUIRED_VERSION = @LIBHEIF_REQUIRED_VERSION@ +LIBJXL_REQUIRED_VERSION = @LIBJXL_REQUIRED_VERSION@ +LIBLZMA_REQUIRED_VERSION = @LIBLZMA_REQUIRED_VERSION@ +LIBMYPAINT_CFLAGS = @LIBMYPAINT_CFLAGS@ +LIBMYPAINT_LIBS = @LIBMYPAINT_LIBS@ +LIBMYPAINT_REQUIRED_VERSION = @LIBMYPAINT_REQUIRED_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBPNG_REQUIRED_VERSION = @LIBPNG_REQUIRED_VERSION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIBUNWIND_REQUIRED_VERSION = @LIBUNWIND_REQUIRED_VERSION@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LT_VERSION_INFO = @LT_VERSION_INFO@ +LZMA_CFLAGS = @LZMA_CFLAGS@ +LZMA_LIBS = @LZMA_LIBS@ +MAIL = @MAIL@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIME_INFO_CFLAGS = @MIME_INFO_CFLAGS@ +MIME_INFO_LIBS = @MIME_INFO_LIBS@ +MIME_TYPES = @MIME_TYPES@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@ +MNG_CFLAGS = @MNG_CFLAGS@ +MNG_LIBS = @MNG_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +MYPAINT_BRUSHES_CFLAGS = @MYPAINT_BRUSHES_CFLAGS@ +MYPAINT_BRUSHES_LIBS = @MYPAINT_BRUSHES_LIBS@ +NATIVE_GLIB_CFLAGS = @NATIVE_GLIB_CFLAGS@ +NATIVE_GLIB_LIBS = @NATIVE_GLIB_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OPENEXR_REQUIRED_VERSION = @OPENEXR_REQUIRED_VERSION@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ +OPENJPEG_REQUIRED_VERSION = @OPENJPEG_REQUIRED_VERSION@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ +PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ +PANGOCAIRO_REQUIRED_VERSION = @PANGOCAIRO_REQUIRED_VERSION@ +PATHSEP = @PATHSEP@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_REQUIRED_VERSION = @PERL_REQUIRED_VERSION@ +PERL_VERSION = @PERL_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +POFILES = @POFILES@ +POPPLER_CFLAGS = @POPPLER_CFLAGS@ +POPPLER_DATA_CFLAGS = @POPPLER_DATA_CFLAGS@ +POPPLER_DATA_LIBS = @POPPLER_DATA_LIBS@ +POPPLER_DATA_REQUIRED_VERSION = @POPPLER_DATA_REQUIRED_VERSION@ +POPPLER_LIBS = @POPPLER_LIBS@ +POPPLER_REQUIRED_VERSION = @POPPLER_REQUIRED_VERSION@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYBIN_PATH = @PYBIN_PATH@ +PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@ +PYCAIRO_LIBS = @PYCAIRO_LIBS@ +PYGIMP_EXTRA_CFLAGS = @PYGIMP_EXTRA_CFLAGS@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYLINK_LIBS = @PYLINK_LIBS@ +PYTHON = @PYTHON@ +PYTHON2_REQUIRED_VERSION = @PYTHON2_REQUIRED_VERSION@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_REQUIRED_VERSION = @RSVG_REQUIRED_VERSION@ +RT_LIBS = @RT_LIBS@ +SCREENSHOT_LIBS = @SCREENSHOT_LIBS@ +SED = @SED@ +SENDMAIL = @SENDMAIL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOCKET_LIBS = @SOCKET_LIBS@ +SSE2_EXTRA_CFLAGS = @SSE2_EXTRA_CFLAGS@ +SSE4_1_EXTRA_CFLAGS = @SSE4_1_EXTRA_CFLAGS@ +SSE_EXTRA_CFLAGS = @SSE_EXTRA_CFLAGS@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +SYMPREFIX = @SYMPREFIX@ +TIFF_LIBS = @TIFF_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WEBKIT_CFLAGS = @WEBKIT_CFLAGS@ +WEBKIT_LIBS = @WEBKIT_LIBS@ +WEBKIT_REQUIRED_VERSION = @WEBKIT_REQUIRED_VERSION@ +WEBPDEMUX_CFLAGS = @WEBPDEMUX_CFLAGS@ +WEBPDEMUX_LIBS = @WEBPDEMUX_LIBS@ +WEBPMUX_CFLAGS = @WEBPMUX_CFLAGS@ +WEBPMUX_LIBS = @WEBPMUX_LIBS@ +WEBP_CFLAGS = @WEBP_CFLAGS@ +WEBP_LIBS = @WEBP_LIBS@ +WEBP_REQUIRED_VERSION = @WEBP_REQUIRED_VERSION@ +WEB_PAGE = @WEB_PAGE@ +WIN32_LARGE_ADDRESS_AWARE = @WIN32_LARGE_ADDRESS_AWARE@ +WINDRES = @WINDRES@ +WMF_CFLAGS = @WMF_CFLAGS@ +WMF_CONFIG = @WMF_CONFIG@ +WMF_LIBS = @WMF_LIBS@ +WMF_REQUIRED_VERSION = @WMF_REQUIRED_VERSION@ +XDG_EMAIL = @XDG_EMAIL@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_REQUIRED_VERSION = @XGETTEXT_REQUIRED_VERSION@ +XMC_CFLAGS = @XMC_CFLAGS@ +XMC_LIBS = @XMC_LIBS@ +XMKMF = @XMKMF@ +XMLLINT = @XMLLINT@ +XMU_LIBS = @XMU_LIBS@ +XPM_LIBS = @XPM_LIBS@ +XSLTPROC = @XSLTPROC@ +XVFB_RUN = @XVFB_RUN@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gimpdatadir = @gimpdatadir@ +gimpdir = @gimpdir@ +gimplocaledir = @gimplocaledir@ +gimpplugindir = @gimpplugindir@ +gimpsysconfdir = @gimpsysconfdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +manpage_gimpdir = @manpage_gimpdir@ +mkdir_p = @mkdir_p@ +ms_librarian = @ms_librarian@ +mypaint_brushes_dir = @mypaint_brushes_dir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la +libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la +libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la +libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la +filerawdatadir = $(gimpdatadir)/file-raw +@OS_WIN32_TRUE@mwindows = -mwindows + +# if HAVE_WINDRES +# include $(top_srcdir)/build/windows/gimprc-plug-ins.rule +# file_darktable_RC = file-darktable.rc.o +# file_rawtherapee_RC = file-rawtherapee.rc.o +# file_raw_placeholder_RC = file-raw-placeholder.rc.o +# endif +AM_LDFLAGS = $(mwindows) +dt_libexecdir = $(gimpplugindir)/plug-ins/file-darktable +rt_libexecdir = $(gimpplugindir)/plug-ins/file-rawtherapee +rp_libexecdir = $(gimpplugindir)/plug-ins/file-raw-placeholder +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + -I$(includedir) \ + $(GTK_CFLAGS) \ + $(GEGL_CFLAGS) + +file_darktable_SOURCES = \ + file-darktable.c \ + file-raw-formats.h \ + file-raw-utils.c \ + file-raw-utils.h + +file_rawtherapee_SOURCES = \ + file-rawtherapee.c \ + file-raw-formats.h \ + file-raw-utils.c \ + file-raw-utils.h + +file_raw_placeholder_SOURCES = \ + file-raw-formats.h \ + file-raw-placeholder.c + +file_darktable_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_darktable_RC) + +file_rawtherapee_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_rawtherapee_RC) + +file_raw_placeholder_LDADD = \ + $(libgimp) \ + $(libgimpbase) \ + $(libgimpcolor) \ + $(libgimpconfig) \ + $(CAIRO_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(file_raw_placeholder_RC) + +filerawdata_DATA = \ + file-darktable-export-on-exit.lua \ + file-darktable-get-size.lua + +EXTRA_DIST = $(filerawdata_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plug-ins/file-raw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plug-ins/file-raw/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-dt_libexecPROGRAMS: $(dt_libexec_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(dt_libexec_PROGRAMS)'; test -n "$(dt_libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dt_libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dt_libexecdir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(dt_libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(dt_libexecdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-dt_libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(dt_libexec_PROGRAMS)'; test -n "$(dt_libexecdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(dt_libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(dt_libexecdir)" && rm -f $$files + +clean-dt_libexecPROGRAMS: + @list='$(dt_libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +install-rp_libexecPROGRAMS: $(rp_libexec_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(rp_libexec_PROGRAMS)'; test -n "$(rp_libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(rp_libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(rp_libexecdir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(rp_libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(rp_libexecdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-rp_libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(rp_libexec_PROGRAMS)'; test -n "$(rp_libexecdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(rp_libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(rp_libexecdir)" && rm -f $$files + +clean-rp_libexecPROGRAMS: + @list='$(rp_libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +install-rt_libexecPROGRAMS: $(rt_libexec_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(rt_libexec_PROGRAMS)'; test -n "$(rt_libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(rt_libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(rt_libexecdir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(rt_libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(rt_libexecdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-rt_libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(rt_libexec_PROGRAMS)'; test -n "$(rt_libexecdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(rt_libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(rt_libexecdir)" && rm -f $$files + +clean-rt_libexecPROGRAMS: + @list='$(rt_libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +file-darktable$(EXEEXT): $(file_darktable_OBJECTS) $(file_darktable_DEPENDENCIES) $(EXTRA_file_darktable_DEPENDENCIES) + @rm -f file-darktable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_darktable_OBJECTS) $(file_darktable_LDADD) $(LIBS) + +file-raw-placeholder$(EXEEXT): $(file_raw_placeholder_OBJECTS) $(file_raw_placeholder_DEPENDENCIES) $(EXTRA_file_raw_placeholder_DEPENDENCIES) + @rm -f file-raw-placeholder$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_raw_placeholder_OBJECTS) $(file_raw_placeholder_LDADD) $(LIBS) + +file-rawtherapee$(EXEEXT): $(file_rawtherapee_OBJECTS) $(file_rawtherapee_DEPENDENCIES) $(EXTRA_file_rawtherapee_DEPENDENCIES) + @rm -f file-rawtherapee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_rawtherapee_OBJECTS) $(file_rawtherapee_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-darktable.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-raw-placeholder.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-raw-utils.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-rawtherapee.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-filerawdataDATA: $(filerawdata_DATA) + @$(NORMAL_INSTALL) + @list='$(filerawdata_DATA)'; test -n "$(filerawdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(filerawdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(filerawdatadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filerawdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(filerawdatadir)" || exit $$?; \ + done + +uninstall-filerawdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(filerawdata_DATA)'; test -n "$(filerawdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(filerawdatadir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(dt_libexecdir)" "$(DESTDIR)$(rp_libexecdir)" "$(DESTDIR)$(rt_libexecdir)" "$(DESTDIR)$(filerawdatadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-dt_libexecPROGRAMS clean-generic clean-libtool \ + clean-rp_libexecPROGRAMS clean-rt_libexecPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/file-darktable.Po + -rm -f ./$(DEPDIR)/file-raw-placeholder.Po + -rm -f ./$(DEPDIR)/file-raw-utils.Po + -rm -f ./$(DEPDIR)/file-rawtherapee.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-filerawdataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-dt_libexecPROGRAMS install-rp_libexecPROGRAMS \ + install-rt_libexecPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/file-darktable.Po + -rm -f ./$(DEPDIR)/file-raw-placeholder.Po + -rm -f ./$(DEPDIR)/file-raw-utils.Po + -rm -f ./$(DEPDIR)/file-rawtherapee.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dt_libexecPROGRAMS uninstall-filerawdataDATA \ + uninstall-rp_libexecPROGRAMS uninstall-rt_libexecPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-dt_libexecPROGRAMS clean-generic clean-libtool \ + clean-rp_libexecPROGRAMS clean-rt_libexecPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dt_libexecPROGRAMS \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-filerawdataDATA install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am \ + install-rp_libexecPROGRAMS install-rt_libexecPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dt_libexecPROGRAMS uninstall-filerawdataDATA \ + uninstall-rp_libexecPROGRAMS uninstall-rt_libexecPROGRAMS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plug-ins/file-raw/file-darktable-export-on-exit.lua b/plug-ins/file-raw/file-darktable-export-on-exit.lua new file mode 100644 index 0000000..79b27dc --- /dev/null +++ b/plug-ins/file-raw/file-darktable-export-on-exit.lua @@ -0,0 +1,88 @@ +--[[ + This file is part of GIMP, + copyright (c) 2015-2017 Tobias Ellinghaus + + GIMP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GIMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GIMP. If not, see . +]] + +--[[ +EXPORT ON EXIT +exports all (but at most 1) images from the database to prefs setting "lua/export_on_exit/export_filename" +when darktable exits + + +USAGE +* require this file from your main lua config file +* or: use --luacmd "dofile('/path/to/this/file.lua')" +* and make sure to set the export filename + +]] + +local dt = require "darktable" + +local orig_register_event = dt.register_event + +function dt.register_event(name, event, func, label) + if dt.configuration.api_version_string >= "6.2.1" then + if label then + orig_register_event(name, event, func, label) + else + orig_register_event(name, event, func) + end + else + if label then + orig_register_event(event, func, label) + else + orig_register_event(event, func) + end + end +end + +local min_api_version = "2.1.0" +if dt.configuration.api_version_string < min_api_version then + dt.print("the exit export script requires at least darktable version 1.7.0") + dt.print_error("the exit export script requires at least darktable version 1.7.0") + return +else + dt.print("closing darktable will export the image and make GIMP load it") +end + +local CURR_API_STRING = dt.configuration.api_version_string + +local export_filename = dt.preferences.read("export_on_exit", "export_filename", "string") + +dt.register_event("fileraw", "exit", function() + -- safegurad against someone using this with their library containing 50k images + if #dt.database > 1 then + dt.print_error("too many images, only exporting the first") +-- return + end + + -- change the view first to force writing of the history stack + dt.gui.current_view(dt.gui.views.lighttable) + -- now export + local format = dt.new_format("exr") + format.max_width = 0 + format.max_height = 0 + -- let's have the export in a loop so we could easily support > 1 images + for _, image in ipairs(dt.database) do + dt.print_error("exporting `"..tostring(image).."' to `"..export_filename.."'") + format:write_image(image, export_filename) + break -- only export one image. see above for the reason + end +end) + +-- +-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua +-- kate: hl Lua; diff --git a/plug-ins/file-raw/file-darktable-get-size.lua b/plug-ins/file-raw/file-darktable-get-size.lua new file mode 100644 index 0000000..c82ed44 --- /dev/null +++ b/plug-ins/file-raw/file-darktable-get-size.lua @@ -0,0 +1,21 @@ +--[[ + This file is part of GIMP, + copyright (c) 2016 Tobias Ellinghaus + + GIMP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GIMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GIMP. If not, see . +]] + +local dt = require "darktable" + +print("[dt4gimp] " .. (dt.database[1].width) .. " " .. (dt.database[1].height)) diff --git a/plug-ins/file-raw/file-darktable.c b/plug-ins/file-raw/file-darktable.c new file mode 100644 index 0000000..b5897c8 --- /dev/null +++ b/plug-ins/file-raw/file-darktable.c @@ -0,0 +1,550 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-darktable.c -- raw file format plug-in that uses darktable + * Copyright (C) 2012 Simon Budig + * Copyright (C) 2016 Tobias Ellinghaus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include + +#include + +#include "libgimp/stdplugins-intl.h" + +#include "file-raw-formats.h" +#include "file-raw-utils.h" + + +#define LOAD_THUMB_PROC "file-darktable-load-thumb" +#define REGISTRY_KEY_BASE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\darktable" + + +static void init (void); +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); +static gint32 load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error); + +static gint32 load_thumbnail_image (const gchar *filename, + gint thumb_size, + gint *width, + gint *height, + GError **error); + + +const GimpPlugInInfo PLUG_IN_INFO = +{ + init, /* init_proc */ + NULL, /* quit_proc */ + query, /* query proc */ + run, /* run_proc */ +}; + +MAIN () + +static void +init (void) +{ + static const GimpParamDef load_args[] = + { + { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load." }, + { GIMP_PDB_STRING, "raw-filename", "The name entered" }, + }; + + static const GimpParamDef load_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Output image" } + }; + + static const GimpParamDef thumb_args[] = + { + { GIMP_PDB_STRING, "filename", "The name of the file to load" }, + { GIMP_PDB_INT32, "thumb-size", "Preferred thumbnail size" } + }; + + static const GimpParamDef thumb_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Thumbnail image" }, + { GIMP_PDB_INT32, "image-width", "Width of full-sized image" }, + { GIMP_PDB_INT32, "image-height", "Height of full-sized image" } + }; + + /* check if darktable is installed + */ + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("darktable", NULL, + "DARKTABLE_EXECUTABLE", + "org.darktable", + REGISTRY_KEY_BASE, + &search_path); + gchar *argv[] = { exec_path, "--version", NULL }; + gchar *darktable_stdout = NULL; + gchar *darktable_stderr = NULL; + gboolean have_darktable = FALSE; + GError *error = NULL; + gint i; + + /* allow the user to have some insight into why darktable may fail. */ + gboolean debug_prints = g_getenv ("DARKTABLE_DEBUG") != NULL; + + if (debug_prints) + g_printf ("[%s] trying to call '%s'\n", __FILE__, exec_path); + + if (g_spawn_sync (NULL, + argv, + NULL, + (search_path ? G_SPAWN_SEARCH_PATH : 0), + NULL, + NULL, + &darktable_stdout, + &darktable_stderr, + NULL, + &error)) + { + GRegex *regex; + GMatchInfo *matches; + gint major; + gint minor; + + /* A default darktable would apparently output something like + * "this is darktable 2.2.5", but this version string is + * customizable. In the official Fedora package for instance, I + * encountered a "this is darktable darktable-2.2.5-4.fc27". + * Therefore make the version recognition a bit more flexible. + */ + regex = g_regex_new ("this is darktable [^0-9]*([0-9]+)\\.([0-9]+)\\.([0-9]+)", + 0, 0, NULL); + if (g_regex_match (regex, darktable_stdout, 0, &matches)) + { + gchar *match; + + match = g_match_info_fetch (matches, 1); + major = g_ascii_strtoll (match, NULL, 10); + g_free (match); + + match = g_match_info_fetch (matches, 2); + minor = g_ascii_strtoll (match, NULL, 10); + g_free (match); + + if (((major == 1 && minor >= 7) || major >= 2)) + { + if (g_strstr_len (darktable_stdout, -1, + "Lua support enabled")) + { + have_darktable = TRUE; + } + } + } + + g_match_info_free (matches); + g_regex_unref (regex); + } + else if (debug_prints) + { + g_printf ("[%s] g_spawn_sync failed\n", __FILE__); + } + + if (debug_prints) + { + if (error) + g_printf ("[%s] error: %s\n", __FILE__, error->message); + + if (darktable_stdout && *darktable_stdout) + g_printf ("[%s] stdout:\n%s\n", __FILE__, darktable_stdout); + + if (darktable_stderr && *darktable_stderr) + g_printf ("[%s] stderr:\n%s\n", __FILE__, darktable_stderr); + + g_printf ("[%s] have_darktable: %d\n", __FILE__, have_darktable); + } + + g_clear_error (&error); + + g_free (darktable_stdout); + g_free (darktable_stderr); + g_free (exec_path); + + if (! have_darktable) + return; + + gimp_install_procedure (LOAD_THUMB_PROC, + "Load thumbnail from a raw image via darktable", + "This plug-in loads a thumbnail from a raw image by calling darktable-cli.", + "Tobias Ellinghaus", + "Tobias Ellinghaus", + "2016", + NULL, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (thumb_args), + G_N_ELEMENTS (thumb_return_vals), + thumb_args, thumb_return_vals); + + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc; + gchar *load_blurb; + gchar *load_help; + + load_proc = g_strdup_printf (format->load_proc_format, "darktable"); + load_blurb = g_strdup_printf (format->load_blurb_format, "darktable"); + load_help = g_strdup_printf (format->load_help_format, "darktable"); + + gimp_install_procedure (load_proc, + load_blurb, + load_help, + "Tobias Ellinghaus", + "Tobias Ellinghaus", + "2016", + format->file_type, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (load_args), + G_N_ELEMENTS (load_return_vals), + load_args, load_return_vals); + + gimp_register_file_handler_mime (load_proc, + format->mime_type); + gimp_register_file_handler_raw (load_proc); + gimp_register_magic_load_handler (load_proc, + format->extensions, + "", + format->magic); + + gimp_register_thumbnail_loader (load_proc, LOAD_THUMB_PROC); + + g_free (load_proc); + g_free (load_blurb); + g_free (load_help); + } +} + +static void +query (void) +{ + /* query() is run only the first time for efficiency. Yet this plugin + * is dependent on the presence of darktable which may be installed + * or uninstalled between GIMP startups. Therefore we should move the + * usual gimp_install_procedure() to init() so that the check is done + * at every startup instead. + */ +} + +static void +run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals) +{ + static GimpParam values[6]; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpRunMode run_mode; + gint image_ID; + GError *error = NULL; + gint i; + + INIT_I18N (); + + run_mode = param[0].data.d_int32; + + *nreturn_vals = 1; + *return_vals = values; + + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; + + /* check if the format passed is actually supported & load */ + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc = NULL; + + if (format->load_proc_format) + load_proc = g_strdup_printf (format->load_proc_format, "darktable"); + + if (load_proc && ! strcmp (name, load_proc)) + { + image_ID = load_image (param[1].data.d_string, run_mode, &error); + + if (image_ID != -1) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + else if (! strcmp (name, LOAD_THUMB_PROC)) + { + gint width = 0; + gint height = 0; + + image_ID = load_thumbnail_image (param[0].data.d_string, + param[1].data.d_int32, + &width, + &height, + &error); + + if (image_ID != -1) + { + *nreturn_vals = 6; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + values[2].type = GIMP_PDB_INT32; + values[2].data.d_int32 = width; + values[3].type = GIMP_PDB_INT32; + values[3].data.d_int32 = height; + values[4].type = GIMP_PDB_INT32; + values[4].data.d_int32 = GIMP_RGB_IMAGE; + values[5].type = GIMP_PDB_INT32; + values[5].data.d_int32 = 1; /* num_layers */ + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + } + + if (i == G_N_ELEMENTS (file_formats)) + status = GIMP_PDB_CALLING_ERROR; + + if (status != GIMP_PDB_SUCCESS && error) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_STRING; + values[1].data.d_string = error->message; + } + + values[0].data.d_status = status; +} + +static gint32 +load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error) +{ + gint32 image_ID = -1; + GFile *lua_file = gimp_data_directory_file ("file-raw", + "file-darktable-export-on-exit.lua", + NULL); + gchar *lua_script = g_file_get_path (lua_file); + gchar *lua_script_escaped = g_strescape (lua_script, ""); + gchar *lua_quoted = g_shell_quote (lua_script_escaped); + gchar *lua_cmd = g_strdup_printf ("dofile(%s)", lua_quoted); + gchar *filename_out = gimp_temp_name ("exr"); + gchar *export_filename = g_strdup_printf ("lua/export_on_exit/export_filename=%s", + filename_out); + + gchar *darktable_stdout = NULL; + gchar *darktable_stderr = NULL; + + /* allow the user to have some insight into why darktable may fail. */ + gboolean debug_prints = g_getenv ("DARKTABLE_DEBUG") != NULL; + + /* linear sRGB for now as GIMP uses that internally in many places anyway */ + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("darktable", NULL, + "DARKTABLE_EXECUTABLE", + "org.darktable", + REGISTRY_KEY_BASE, + &search_path); + gchar *argv[] = + { + exec_path, + "--library", ":memory:", + "--luacmd", lua_cmd, + "--conf", "plugins/lighttable/export/icctype=3", + "--conf", export_filename, + (gchar *) filename, + NULL + }; + + g_object_unref (lua_file); + g_free (lua_script); + g_free (lua_script_escaped); + g_free (lua_quoted); + + gimp_progress_init_printf (_("Opening '%s'"), + gimp_filename_to_utf8 (filename)); + + if (debug_prints) + { + gchar **environ_ = g_get_environ (); + gint i; + + g_printf ("[%s] trying to call\n", __FILE__); + for (gchar **iter = argv; *iter; iter++) + g_printf (" %s\n", *iter); + g_printf ("\n"); + + g_printf ("## Environment ##\n"); + for (i = 0; environ_[i]; i++) + g_printf ("- %s\n", environ_[i]); + g_strfreev (environ_) ; + } + + if (g_spawn_sync (NULL, + argv, + NULL, + /*G_SPAWN_STDOUT_TO_DEV_NULL |*/ + /*G_SPAWN_STDERR_TO_DEV_NULL |*/ + (search_path ? G_SPAWN_SEARCH_PATH : 0), + NULL, + NULL, + &darktable_stdout, + &darktable_stderr, + NULL, + error)) + { + image_ID = gimp_file_load (run_mode, filename_out, filename_out); + if (image_ID != -1) + gimp_image_set_filename (image_ID, filename); + } + + if (debug_prints) + { + if (darktable_stdout && *darktable_stdout) + g_printf ("\n## stdout ##\n%s\n", darktable_stdout); + + if (darktable_stderr && *darktable_stderr) + g_printf ("\n## stderr ##\n%s\n", darktable_stderr); + } + + g_free (darktable_stdout); + g_free (darktable_stderr); + + g_unlink (filename_out); + g_free (lua_cmd); + g_free (filename_out); + g_free (export_filename); + g_free (exec_path); + + gimp_progress_update (1.0); + + return image_ID; +} + +static gint32 +load_thumbnail_image (const gchar *filename, + gint thumb_size, + gint *width, + gint *height, + GError **error) +{ + gint32 image_ID = -1; + gchar *filename_out = gimp_temp_name ("jpg"); + gchar *size = g_strdup_printf ("%d", thumb_size); + GFile *lua_file = gimp_data_directory_file ("file-raw", + "file-darktable-get-size.lua", + NULL); + gchar *lua_script = g_file_get_path (lua_file); + gchar *lua_script_escaped = g_strescape (lua_script, ""); + gchar *lua_quoted = g_shell_quote (lua_script_escaped); + gchar *lua_cmd = g_strdup_printf ("dofile(%s)", lua_quoted); + gchar *darktable_stdout = NULL; + + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("darktable", "-cli", + "DARKTABLE_EXECUTABLE", + "org.darktable", + REGISTRY_KEY_BASE, + &search_path); + gchar *argv[] = + { + exec_path, + (gchar *) filename, filename_out, + "--width", size, + "--height", size, + "--hq", "false", + "--core", + "--conf", "plugins/lighttable/export/icctype=3", + "--luacmd", lua_cmd, + NULL + }; + + g_object_unref (lua_file); + g_free (lua_script); + g_free (lua_script_escaped); + g_free (lua_quoted); + + gimp_progress_init_printf (_("Opening thumbnail for '%s'"), + gimp_filename_to_utf8 (filename)); + + *width = *height = thumb_size; + + if (g_spawn_sync (NULL, + argv, + NULL, + G_SPAWN_STDERR_TO_DEV_NULL | + (search_path ? G_SPAWN_SEARCH_PATH : 0), + NULL, + NULL, + &darktable_stdout, + NULL, + NULL, + error)) + { + gimp_progress_update (0.5); + + image_ID = gimp_file_load (GIMP_RUN_NONINTERACTIVE, + filename_out, + filename_out); + if (image_ID != -1) + { + /* the size reported by raw files isn't precise, + * but it should be close enough to get an idea. + */ + gchar *start_of_size = g_strstr_len (darktable_stdout, + -1, + "[dt4gimp]"); + if (start_of_size) + sscanf (start_of_size, "[dt4gimp] %d %d", width, height); + + /* is this needed for thumbnails? */ + gimp_image_set_filename (image_ID, filename); + } + } + + gimp_progress_update (1.0); + + g_unlink (filename_out); + g_free (filename_out); + g_free (size); + g_free (lua_cmd); + g_free (darktable_stdout); + g_free (exec_path); + + return image_ID; +} diff --git a/plug-ins/file-raw/file-raw-formats.h b/plug-ins/file-raw/file-raw-formats.h new file mode 100644 index 0000000..672bb00 --- /dev/null +++ b/plug-ins/file-raw/file-raw-formats.h @@ -0,0 +1,320 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-darktable.c -- raw file format plug-in that uses darktable + * Copyright (C) 2016 Tobias Ellinghaus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* These are the raw formats that file-darktable will register */ + +typedef struct _FileFormat FileFormat; + +struct _FileFormat +{ + const gchar *file_type; + const gchar *mime_type; + const gchar *extensions; + const gchar *magic; + + const gchar *load_proc_format; + const gchar *load_blurb_format; + const gchar *load_help_format; +}; + +/* some magic numbers taken from + * http://www.garykessler.net/library/file_sigs.html + * + * see also + * http://fileformats.archiveteam.org/wiki/Cameras_and_Digital_Image_Sensors + */ +static const FileFormat file_formats[] = +{ + { + N_("Raw Canon"), + "image/x-canon-cr2,image/x-canon-crw,image/x-canon-cr3", + "cr2,crw,cr3", + "0,string,II*\\0\\020\\0\\0\\0CR," /* cr2 */ + "0,string,II\\024\\0\\0\\0HEAPCCDR," /* crw */ + "4,string,ftypcrx ", /* cr3 */ + + "file-%s-canon-load", + "Load files in the Canon raw formats via %s", + "This plug-in loads files in Canon's raw formats by calling %s." + }, + + { + N_("Raw Nikon"), + "image/x-nikon-nef,image/x-nikon-nrw", + "nef,nrw", + NULL, + + "file-%s-nikon-load", + "Load files in the Nikon raw formats via %s", + "This plug-in loads files in Nikon's raw formats by calling %s." + }, + + { + N_("Raw Hasselblad"), + "image/x-hasselblad-3fr,image/x-hasselblad-fff", + "3fr,fff", + NULL, + + "file-%s-hasselblad-load", + "Load files in the Hasselblad raw formats via %s", + "This plug-in loads files in Hasselblad's raw formats by calling %s." + }, + + { + N_("Raw Sony"), + "image/x-sony-arw,image/x-sony-srf,image/x-sony-sr2", + "arw,srf,sr2", + NULL, + + "file-%s-sony-load", + "Load files in the Sony raw formats via %s", + "This plug-in loads files in Sony's raw formats by calling %s." + }, + + { + N_("Raw Casio BAY"), + "image/x-casio-bay", + "bay", + NULL, + + "file-%s-bay-load", + "Load files in the BAY raw format via %s", + "This plug-in loads files in Casio's raw BAY format by calling %s." + }, + + { + N_("Raw Phantom Software CINE"), + "", /* FIXME: find a mime type */ + "cine,cin", + NULL, + + "file-%s-cine-load", + "Load files in the CINE raw format via %s", + "This plug-in loads files in Phantom Software's raw CINE format by calling %s." + }, + + { + N_("Raw Sinar"), + "", /* FIXME: find a mime type */ + "cs1,ia,sti", + NULL, + + "file-%s-sinar-load", + "Load files in the Sinar raw formats via %s", + "This plug-in loads files in Sinar's raw formats by calling %s." + }, + + { + N_("Raw Kodak"), + "image/x-kodak-dc2,image/x-kodak-dcr,image/x-kodak-kdc,image/x-kodak-k25,image/x-kodak-kc2", + "dc2,dcr,kdc,k25,kc2", + NULL, + + "file-%s-kodak-load", + "Load files in the Kodak raw formats via %s", + "This plug-in loads files in Kodak's raw formats by calling %s." + }, + + { + N_("Raw Adobe DNG Digital Negative"), + "image/x-adobe-dng", + "dng", + NULL, + + "file-%s-dng-load", + "Load files in the DNG raw format via %s", + "This plug-in loads files in the Adobe Digital Negative DNG format by calling %s." + }, + + { + N_("Raw Epson ERF"), + "image/x-epson-erf", + "erf", + NULL, + + "file-%s-erf-load", + "Load files in the ERF raw format via %s", + "This plug-in loads files in Epson's raw ERF format by calling %s." + }, + + { + N_("Raw Phase One"), + "image/x-phaseone-cap,image/x-phaseone-iiq", + "cap,iiq", + NULL, + + "file-%s-phaseone-load", + "Load files in the Phase One raw formats via %s", + "This plug-in loads files in Phase One's raw formats by calling %s." + }, + + { + N_("Raw Minolta"), + "image/x-minolta-mdc,image/x-minolta-mrw", + "mdc,mrw", + NULL, + + "file-%s-minolta-load", + "Load files in the Minolta raw formats via %s", + "This plug-in loads files in Minolta's raw formats by calling %s." + }, + + { + N_("Raw Mamiya MEF"), + "image/x-mamiya-mef", + "mef", NULL, + + "file-%s-mef-load", + "Load files in the MEF raw format via %s", + "This plug-in loads files in Mamiya's raw MEF format by calling %s." + }, + + { + N_("Raw Leaf MOS"), + "image/x-leaf-mos", + "mos", + NULL, + + "file-%s-mos-load", + "Load files in the MOS raw format via %s", + "This plug-in loads files in Leaf's raw MOS format by calling %s." + }, + + { + N_("Raw Olympus ORF"), + "image/x-olympus-orf", + "orf", + "0,string,IIRO,0,string,MMOR,0,string,IIRS", + + "file-%s-orf-load", + "Load files in the ORF raw format via %s", + "This plug-in loads files in Olympus' raw ORF format by calling %s." + }, + + { + N_("Raw Pentax PEF"), + "image/x-pentax-pef,image/x-pentax-raw", + "pef,raw", + NULL, + + "file-%s-pef-load", + "Load files in the PEF raw format via %s", + "This plug-in loads files in Pentax' raw PEF format by calling %s." + }, + + { + N_("Raw Logitech PXN"), + "image/x-pxn", /* FIXME: is that the correct mime type? */ + "pxn", + NULL, + + "file-%s-pxn-load", + "Load files in the PXN raw format via %s", + "This plug-in loads files in Logitech's raw PXN format by calling %s." + }, + + { + N_("Raw Apple QuickTake QTK"), + "", /* FIXME: find a mime type */ + "qtk", + NULL, + + "file-%s-qtk-load", + "Load files in the QTK raw format via %s", + "This plug-in loads files in Apple's QuickTake QTK raw format by calling %s." + }, + + { + N_("Raw Fujifilm RAF"), + "image/x-fuji-raf", + "raf", + "0,string,FUJIFILMCCD-RAW", + + "file-%s-raf-load", + "Load files in the RAF raw format via %s", + "This plug-in loads files in Fujifilm's raw RAF format by calling %s." + }, + + { + N_("Raw Panasonic"), + "image/x-panasonic-raw,image/x-panasonic-rw2", + "raw,rw2", + "0,string,IIU\\0", + + "file-%s-panasonic-load", + "Load files in the Panasonic raw formats via %s", + "This plug-in loads files in Panasonic's raw formats by calling %s." + }, + + { + N_("Raw Digital Foto Maker RDC"), + "", /* FIXME: find a mime type */ + "rdc", + NULL, + + "file-%s-rdc-load", + "Load files in the RDC raw format via %s", + "This plug-in loads files in Digital Foto Maker's raw RDC format by calling %s." + }, + + { + N_("Raw Leica RWL"), + "image/x-leica-rwl", + "rwl", + NULL, + + "file-%s-rwl-load", + "Load files in the RWL raw format via %s", + "This plug-in loads files in Leica's raw RWL format by calling %s." + }, + + { + N_("Raw Samsung SRW"), + "image/x-samsung-srw", + "srw", + NULL, + + "file-%s-srw-load", + "Load files in the SRW raw format via %s", + "This plug-in loads files in Samsung's raw SRW format by calling %s." + }, + + { + N_("Raw Sigma X3F"), + "image/x-sigma-x3f", + "x3f", + "0,string,FOVb", + + "file-%s-x3f-load", + "Load files in the X3F raw format via %s", + "This plug-in loads files in Sigma's raw X3F format by calling %s." + }, + + { + N_("Raw Arriflex ARI"), + "", + "ari", + NULL, + + "file-%s-ari-load", + "Load files in the ARI raw format via %s", + "This plug-in loads files in Arriflex' raw ARI format by calling %s." + } +}; diff --git a/plug-ins/file-raw/file-raw-placeholder.c b/plug-ins/file-raw/file-raw-placeholder.c new file mode 100644 index 0000000..b127da6 --- /dev/null +++ b/plug-ins/file-raw/file-raw-placeholder.c @@ -0,0 +1,163 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-raw-placeholder.c -- raw file format plug-in that does nothing + * except warning that there is no raw plug-in + * Copyright (C) 2017 Michael Natterer + * Copyright (C) 2016 Tobias Ellinghaus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include + +#include "libgimp/stdplugins-intl.h" + +#include "file-raw-formats.h" + + +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); + + +const GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query proc */ + run, /* run_proc */ +}; + + +MAIN () + + +static void +query (void) +{ + static const GimpParamDef load_args[] = + { + { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load." }, + { GIMP_PDB_STRING, "raw-filename", "The name entered" }, + }; + + static const GimpParamDef load_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Output image" } + }; + + gint i; + + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc; + gchar *load_blurb; + gchar *load_help; + + load_proc = g_strdup_printf (format->load_proc_format, "raw-placeholder"); + load_blurb = g_strdup_printf (format->load_blurb_format, "raw-placeholder"); + load_help = g_strdup_printf (format->load_help_format, "raw-placeholder"); + + gimp_install_procedure (load_proc, + load_blurb, + load_help, + "Tobias Ellinghaus", + "Tobias Ellinghaus", + "2016", + format->file_type, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (load_args), + G_N_ELEMENTS (load_return_vals), + load_args, load_return_vals); + + gimp_register_file_handler_mime (load_proc, + format->mime_type); + gimp_register_file_handler_raw (load_proc); + gimp_register_magic_load_handler (load_proc, + format->extensions, + "", + format->magic); + + g_free (load_proc); + g_free (load_blurb); + g_free (load_help); + } +} + +static void +run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals) +{ + static GimpParam values[6]; + GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR; + GError *error = NULL; + gint i; + + INIT_I18N (); + + *nreturn_vals = 1; + *return_vals = values; + + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; + + /* check if the format passed is actually supported & load */ + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc = NULL; + + if (format->load_proc_format) + load_proc = g_strdup_printf (format->load_proc_format, "raw-placeholder"); + + if (load_proc && ! strcmp (name, load_proc)) + { + g_set_error (&error, G_FILE_ERROR, G_FILE_ERROR_FAILED, + _("There is no RAW loader installed to open '%s' files.\n" + "\n" + "GIMP currently supports these RAW loaders:\n" + "- darktable (http://www.darktable.org/), at least 1.7\n" + "- RawTherapee (http://rawtherapee.com/), at least 5.2\n" + "\n" + "Please install one of them in order to " + "load RAW files."), + gettext (format->file_type)); + break; + } + } + + if (i == G_N_ELEMENTS (file_formats)) + status = GIMP_PDB_CALLING_ERROR; + + if (status != GIMP_PDB_SUCCESS && error) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_STRING; + values[1].data.d_string = error->message; + } + + values[0].data.d_status = status; +} diff --git a/plug-ins/file-raw/file-raw-utils.c b/plug-ins/file-raw/file-raw-utils.c new file mode 100644 index 0000000..8847cd0 --- /dev/null +++ b/plug-ins/file-raw/file-raw-utils.c @@ -0,0 +1,153 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-raw-utils.h -- raw file format plug-in + * Copyright (C) 2016 Tobias Ellinghaus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include + +#ifdef GDK_WINDOWING_QUARTZ +#include +#endif + +#ifdef GDK_WINDOWING_WIN32 +#include +#endif + +#include + +#include "file-raw-utils.h" + + +gchar * +file_raw_get_executable_path (const gchar *main_executable, + const gchar *suffix, + const gchar *env_variable, + const gchar *mac_bundle_id, + const gchar *win32_registry_key_base, + gboolean *search_path) +{ + /* + * First check for the environment variable. + * Next do platform specific checks (bundle lookup on Mac, registry stuff + * on Windows). + * Last resort is hoping for the executable to be in PATH. + */ + + /* + * Look for env variable. That can be set directly or via an environ file. + * We assume that just appending the suffix to that value will work. + * That means that on Windows there should be no ".exe"! + */ + const gchar *dt_env = env_variable ? g_getenv (env_variable) : NULL; + + if (dt_env) + return g_strconcat (dt_env, suffix, NULL); + +#if defined (GDK_WINDOWING_QUARTZ) + if (mac_bundle_id) + { + CFStringRef bundle_id; + + /* For macOS, attempt searching for an app bundle first. */ + bundle_id = CFStringCreateWithCString (NULL, mac_bundle_id, + kCFStringEncodingUTF8); + if (bundle_id) + { + OSStatus status; + CFURLRef bundle_url = NULL; + + status = LSFindApplicationForInfo (kLSUnknownCreator, + bundle_id, NULL, NULL, + &bundle_url); + if (status >= 0) + { + CFBundleRef bundle; + CFURLRef exec_url, absolute_url; + CFStringRef path; + gchar *ret; + CFIndex len; + + bundle = CFBundleCreate (kCFAllocatorDefault, bundle_url); + CFRelease (bundle_url); + + exec_url = CFBundleCopyExecutableURL (bundle); + absolute_url = CFURLCopyAbsoluteURL (exec_url); + path = CFURLCopyFileSystemPath (absolute_url, kCFURLPOSIXPathStyle); + + /* This gets us the length in UTF16 characters, we multiply by 2 + * to make sure we have a buffer big enough to fit the UTF8 string. + */ + len = CFStringGetLength (path); + ret = g_malloc0 (len * 2 * sizeof (gchar)); + if (! CFStringGetCString (path, ret, 2 * len * sizeof (gchar), + kCFStringEncodingUTF8)) + ret = NULL; + + CFRelease (path); + CFRelease (absolute_url); + CFRelease (exec_url); + CFRelease (bundle); + + if (ret) + return ret; + } + + CFRelease (bundle_id); + } + /* else, app bundle was not found, try path search as last resort. */ + } + +#elif defined (GDK_WINDOWING_WIN32) + if (win32_registry_key_base) + { + /* Look for the application in the Windows registry. */ + char *registry_key; + char path[MAX_PATH]; + DWORD buffer_size = sizeof (path); + long status; + + if (suffix) + registry_key = g_strconcat (win32_registry_key_base, suffix, ".exe", NULL); + else + registry_key = g_strconcat (win32_registry_key_base, ".exe", NULL); + + /* Check HKCU first in case there is a user specific installation. */ + status = RegGetValue (HKEY_CURRENT_USER, registry_key, "", RRF_RT_ANY, + NULL, (PVOID)&path, &buffer_size); + + if (status != ERROR_SUCCESS) + status = RegGetValue (HKEY_LOCAL_MACHINE, registry_key, "", RRF_RT_ANY, + NULL, (PVOID)&path, &buffer_size); + + g_free (registry_key); + + if (status == ERROR_SUCCESS) + return g_strdup (path); + } +#endif + + /* Finally, the last resort. */ + *search_path = TRUE; + + if (suffix) + return g_strconcat (main_executable, suffix, NULL); + + return g_strdup (main_executable); +} diff --git a/plug-ins/file-raw/file-raw-utils.h b/plug-ins/file-raw/file-raw-utils.h new file mode 100644 index 0000000..0199f1f --- /dev/null +++ b/plug-ins/file-raw/file-raw-utils.h @@ -0,0 +1,33 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-raw-utils.h -- raw file format plug-in + * Copyright (C) 2016 Tobias Ellinghaus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __FILE_RAW_UTILS_H__ +#define __FILE_RAW_UTILS_H__ + + +gchar * file_raw_get_executable_path (const gchar *main_executable, + const gchar *suffix, + const gchar *env_variable, + const gchar *mac_bundle_id, + const gchar *win32_registry_key_base, + gboolean *search_path); + + +#endif /* __FILE_RAW_UTILS_H__ */ diff --git a/plug-ins/file-raw/file-rawtherapee.c b/plug-ins/file-raw/file-rawtherapee.c new file mode 100644 index 0000000..40ef04b --- /dev/null +++ b/plug-ins/file-raw/file-rawtherapee.c @@ -0,0 +1,476 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-rawtherapee.c -- raw file format plug-in that uses RawTherapee + * Copyright (C) 2012 Simon Budig + * Copyright (C) 2016 Tobias Ellinghaus + * Copyright (C) 2017 Alberto Griggio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include + +#include + +#include "libgimp/stdplugins-intl.h" + +#include "file-raw-formats.h" +#include "file-raw-utils.h" + + +#define LOAD_THUMB_PROC "file-rawtherapee-load-thumb" +#define REGISTRY_KEY_BASE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\rawtherapee" + + +static void init (void); +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); +static gint32 load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error); + +static gint32 load_thumbnail_image (const gchar *filename, + gint thumb_size, + GError **error); + +const GimpPlugInInfo PLUG_IN_INFO = +{ + init, /* init_proc */ + NULL, /* quit_proc */ + query, /* query proc */ + run, /* run_proc */ +}; + +MAIN () + + +static void +init (void) +{ + static const GimpParamDef load_args[] = + { + { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load." }, + { GIMP_PDB_STRING, "raw-filename", "The name entered" }, + }; + + static const GimpParamDef load_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Output image" } + }; + + static const GimpParamDef thumb_args[] = + { + { GIMP_PDB_STRING, "filename", "The name of the file to load" }, + { GIMP_PDB_INT32, "thumb-size", "Preferred thumbnail size" } + }; + + static const GimpParamDef thumb_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Thumbnail image" } + }; + + /* check if rawtherapee is installed + * TODO: allow setting the location of the executable in preferences + */ + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("rawtherapee", NULL, + "RAWTHERAPEE_EXECUTABLE", + "com.rawtherapee.rawtherapee", + REGISTRY_KEY_BASE, + &search_path); +#ifdef G_OS_WIN32 + /* Issue #2716 - Prevent RT from opening a console window */ + gchar *argv[] = { exec_path, "-v", "-w", NULL }; +#else + gchar *argv[] = { exec_path, "-v", NULL }; +#endif + gchar *rawtherapee_stdout = NULL; + gboolean have_rawtherapee = FALSE; + gint i; + + if (g_spawn_sync (NULL, + argv, + NULL, + (search_path ? G_SPAWN_SEARCH_PATH : 0) | + G_SPAWN_STDERR_TO_DEV_NULL, + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + NULL)) + { + gint rtmajor = 0; + gint rtminor = 0; + + if (sscanf (rawtherapee_stdout, + "RawTherapee, version %d.%d", + &rtmajor, &rtminor) == 2 && + ((rtmajor == 5 && rtminor >= 2) || rtmajor >= 6)) + { + have_rawtherapee = TRUE; + } + + g_free (rawtherapee_stdout); + } + + g_free (exec_path); + + if (! have_rawtherapee) + return; + + gimp_install_procedure (LOAD_THUMB_PROC, + "Load thumbnail from a raw image via rawtherapee", + "This plug-in loads a thumbnail from a raw image by calling rawtherapee-cli.", + "Alberto Griggio", + "Alberto Griggio", + "2017", + NULL, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (thumb_args), + G_N_ELEMENTS (thumb_return_vals), + thumb_args, thumb_return_vals); + + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc; + gchar *load_blurb; + gchar *load_help; + + load_proc = g_strdup_printf (format->load_proc_format, "rawtherapee"); + load_blurb = g_strdup_printf (format->load_blurb_format, "rawtherapee"); + load_help = g_strdup_printf (format->load_help_format, "rawtherapee"); + + gimp_install_procedure (load_proc, + load_blurb, + load_help, + "Alberto Griggio", + "Alberto Griggio", + "2017", + format->file_type, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (load_args), + G_N_ELEMENTS (load_return_vals), + load_args, load_return_vals); + + gimp_register_file_handler_mime (load_proc, + format->mime_type); + gimp_register_file_handler_raw (load_proc); + gimp_register_magic_load_handler (load_proc, + format->extensions, + "", + format->magic); + + gimp_register_thumbnail_loader (load_proc, LOAD_THUMB_PROC); + + g_free (load_proc); + g_free (load_blurb); + g_free (load_help); + } +} + +static void +query (void) +{ + /* query() is run only the first time for efficiency. Yet this plugin + * is dependent on the presence of rawtherapee which may be installed + * or uninstalled between GIMP startups. Therefore we should move the + * usual gimp_install_procedure() to init() so that the check is done + * at every startup instead. + */ +} + +static void +run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals) +{ + static GimpParam values[6]; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpRunMode run_mode; + gint image_ID; + GError *error = NULL; + gint i; + + INIT_I18N (); + + run_mode = param[0].data.d_int32; + + *nreturn_vals = 1; + *return_vals = values; + + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; + + /* check if the format passed is actually supported & load */ + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + gchar *load_proc = NULL; + + if (format->load_proc_format) + load_proc = g_strdup_printf (format->load_proc_format, "rawtherapee"); + + if (load_proc && ! strcmp (name, load_proc)) + { + image_ID = load_image (param[1].data.d_string, run_mode, &error); + + if (image_ID != -1) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + else if (! strcmp (name, LOAD_THUMB_PROC)) + { + image_ID = load_thumbnail_image (param[0].data.d_string, + param[1].data.d_int32, + &error); + + if (image_ID != -1) + { + *nreturn_vals = 4; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + values[4].type = GIMP_PDB_INT32; + values[4].data.d_int32 = GIMP_RGB_IMAGE; + values[5].type = GIMP_PDB_INT32; + values[5].data.d_int32 = 1; /* num_layers */ + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + } + + if (i == G_N_ELEMENTS (file_formats)) + status = GIMP_PDB_CALLING_ERROR; + + if (status != GIMP_PDB_SUCCESS && error) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_STRING; + values[1].data.d_string = error->message; + } + + values[0].data.d_status = status; +} + +static gint32 +load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error) +{ + gint32 image_ID = -1; + gchar *filename_out = gimp_temp_name ("tif"); + gchar *rawtherapee_stdout = NULL; + + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("rawtherapee", NULL, + "RAWTHERAPEE_EXECUTABLE", + "com.rawtherapee.rawtherapee", + REGISTRY_KEY_BASE, + &search_path); + + /* linear sRGB for now as GIMP uses that internally in many places anyway */ + gchar *argv[] = + { + exec_path, + "-gimp", + (gchar *) filename, + filename_out, + NULL + }; + + gimp_progress_init_printf (_("Opening '%s'"), + gimp_filename_to_utf8 (filename)); + + if (g_spawn_sync (NULL, + argv, + NULL, + /*G_SPAWN_STDOUT_TO_DEV_NULL |*/ + G_SPAWN_STDERR_TO_DEV_NULL | + (search_path ? G_SPAWN_SEARCH_PATH : 0), + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + error)) + { + image_ID = gimp_file_load (run_mode, filename_out, filename_out); + if (image_ID != -1) + gimp_image_set_filename (image_ID, filename); + } + + /*if (rawtherapee_stdout) printf ("%s\n", rawtherapee_stdout);*/ + g_free (rawtherapee_stdout); + g_free (exec_path); + + g_unlink (filename_out); + g_free (filename_out); + + gimp_progress_update (1.0); + + return image_ID; +} + +static gint32 +load_thumbnail_image (const gchar *filename, + gint thumb_size, + GError **error) +{ + gint32 image_ID = -1; + gchar *filename_out = gimp_temp_name ("jpg"); + gchar *thumb_pp3 = gimp_temp_name ("pp3"); + FILE *thumb_pp3_f = fopen (thumb_pp3, "w"); + gchar *rawtherapee_stdout = NULL; + const char *pp3_content = + "[Version]\n" + "AppVersion=5.0\n" + "Version=326\n" + "\n" + "[Resize]\n" + "Enabled=true\n" + "AppliesTo=Cropped area\n" + "Method=Lanczos\n" + "Width=%d\n" + "Height=%d\n" + "\n" + "[Sharpening]\n" + "Enabled=false\n" + "\n" + "[SharpenEdge]\n" + "Enabled=false\n" + "\n" + "[SharpenMicro]\n" + "Enabled=false\n" + "\n" + "[Defringing]\n" + "Enabled=false\n" + "\n" + "[Directional Pyramid Equalizer]\n" + "Enabled=false\n" + "\n" + "[PostResizeSharpening]\n" + "Enabled=false\n" + "\n" + "[Directional Pyramid Denoising]\n" + "Enabled=false\n" + "\n" + "[Impulse Denoising]\n" + "Enabled=false\n" + "\n" + "[Wavelet]\n" + "Enabled=false\n" + "\n" + "[RAW Bayer]\n" + "Method=fast\n" + "\n" + "[RAW X-Trans]\n" + "Method=fast\n"; + + + gboolean search_path = FALSE; + gchar *exec_path = file_raw_get_executable_path ("rawtherapee", "-cli", + "RAWTHERAPEE_EXECUTABLE", + "com.rawtherapee.rawtherapee", + REGISTRY_KEY_BASE, + &search_path); + gchar *argv[] = + { + exec_path, + "-o", filename_out, + "-d", + "-s", + "-j", + "-p", thumb_pp3, + "-f", + "-c", (char *) filename, + NULL + }; + + if (thumb_pp3_f) + { + if (fprintf (thumb_pp3_f, pp3_content, thumb_size, thumb_size) < 0) + { + fclose (thumb_pp3_f); + thumb_pp3_f = NULL; + } + } + + gimp_progress_init_printf (_("Opening thumbnail for '%s'"), + gimp_filename_to_utf8 (filename)); + + if (thumb_pp3_f && + g_spawn_sync (NULL, + argv, + NULL, + G_SPAWN_STDERR_TO_DEV_NULL | + (search_path ? G_SPAWN_SEARCH_PATH : 0), + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + error)) + { + gimp_progress_update (0.5); + + image_ID = gimp_file_load (GIMP_RUN_NONINTERACTIVE, + filename_out, + filename_out); + if (image_ID != -1) + { + /* is this needed for thumbnails? */ + gimp_image_set_filename (image_ID, filename); + } + } + + gimp_progress_update (1.0); + + if (thumb_pp3_f) + fclose (thumb_pp3_f); + + g_unlink (thumb_pp3); + g_free (filename_out); + g_free (thumb_pp3); + g_free (rawtherapee_stdout); + g_free (exec_path); + + return image_ID; +} -- cgit v1.2.3