Author: akv
Date: 2012-04-17 18:55:48 +0200 (Tue, 17 Apr 2012)
New Revision: 4180
Modified:
branches/4175-enfuse/src/rs-enfuse.c
Log:
Checking if we have align_image_stack when exporting.
Modified: branches/4175-enfuse/src/rs-enfuse.c
===================================================================
--- branches/4175-enfuse/src/rs-enfuse.c 2012-04-17 16:05:55 UTC (rev
4179)
+++ branches/4175-enfuse/src/rs-enfuse.c 2012-04-17 16:55:48 UTC (rev
4180)
@@ -32,6 +32,8 @@
#include "rs-photo.h"
#include "rs-cache.h"
+gboolean has_align_image_stack ();
+
GList * export_images(GList *files)
{
gint num_selected = g_list_length(files);
@@ -176,7 +178,11 @@
fullpath = g_string_append(fullpath, ".tif");
}
GList *exported_names = export_images(files);
- GList *aligned_names = align_images(exported_names);
+ GList *aligned_names = NULL;
+ if (has_align_image_stack())
+ aligned_names = align_images(exported_names);
+ else
+ aligned_names = exported_names;
enfuse_images(aligned_names, fullpath->str);
return fullpath->str;
}
@@ -234,3 +240,19 @@
}
return retval;
}
+
+gboolean has_align_image_stack ()
+{
+ FILE *fp;
+ char line[128];
+ gboolean retval = FALSE;
+
+ fp = popen("align_image_stack 2>&1","r");
+ if (fgets(line, sizeof line, fp) == NULL)
+ {
+ g_warning("fgets returned: %d\n", retval);
+ return FALSE;
+ }
+ pclose(fp);
+ return TRUE;
+}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit