#include #include #include "complex.h" typedef struct complex_image_t complex_image_t; struct complex_image_t { int width; int height; complex_t *red; complex_t *green; complex_t *blue; }; complex_image_t * complex_image_new (int width, int height); complex_image_t * complex_image_copy (complex_image_t *image); void complex_image_subtract (complex_image_t *image, complex_image_t *other); void complex_image_mul (complex_image_t *image, double m); complex_image_t * complex_image_from_pixbuf (GdkPixbuf *pixbuf); typedef enum { CONVERT_MAG, /* display the log magnitude */ CONVERT_RE, /* display the real value */ } convert_type_t; GdkPixbuf * pixbuf_from_complex_image (complex_image_t *image, convert_type_t convert); void complex_image_show (const char *title, complex_image_t *image, convert_type_t convert); void complex_image_fft (complex_image_t *image); void complex_image_ifft (complex_image_t *image);