added dft program + adjusted cvsignore file
[physik/nlsop.git] / dft.c
1 /* dft.c - discrete fourier transformation program */
2
3 /*
4  * author: frank.zirkelbach@physik.uni-augsburg.de
5  *
6  */
7
8 #include "dft.h"
9
10 int main(int argc,char **argv) {
11
12   t_fourier fourier;
13   t_bmp src;
14   t_bmp dst;
15
16   bmp_init(&src,1);
17   bmp_init(&dst,1);
18   src.mode=READ;
19   dst.mode=WRITE;
20   strcpy(src.file,argv[1]);
21   strcpy(dst.file,argv[2]);
22
23   bmp_read_file(&src);
24
25   dst.width=src.info.width;
26   dst.height=src.info.height;
27   bmp_alloc_map(&dst);
28
29   /* simple copy for testing by now ! */
30   memcpy(dst.map,src.map,src.info.imagesize);
31
32   bmp_write_file(&dst);
33
34   bmp_shutdown(&src);
35   bmp_shutdown(&dst);
36
37   printf("done ...\n");
38
39   return 1;
40
41 }