added dft program + adjusted cvsignore file
[physik/nlsop.git] / dft.c
diff --git a/dft.c b/dft.c
new file mode 100644 (file)
index 0000000..385c22d
--- /dev/null
+++ b/dft.c
@@ -0,0 +1,41 @@
+/* dft.c - discrete fourier transformation program */
+
+/*
+ * author: frank.zirkelbach@physik.uni-augsburg.de
+ *
+ */
+
+#include "dft.h"
+
+int main(int argc,char **argv) {
+
+  t_fourier fourier;
+  t_bmp src;
+  t_bmp dst;
+
+  bmp_init(&src,1);
+  bmp_init(&dst,1);
+  src.mode=READ;
+  dst.mode=WRITE;
+  strcpy(src.file,argv[1]);
+  strcpy(dst.file,argv[2]);
+
+  bmp_read_file(&src);
+
+  dst.width=src.info.width;
+  dst.height=src.info.height;
+  bmp_alloc_map(&dst);
+
+  /* simple copy for testing by now ! */
+  memcpy(dst.map,src.map,src.info.imagesize);
+
+  bmp_write_file(&dst);
+
+  bmp_shutdown(&src);
+  bmp_shutdown(&dst);
+
+  printf("done ...\n");
+
+  return 1;
+
+}