summaryrefslogtreecommitdiff
path: root/image.h
blob: 404e2f10a7ccd9dea42058eb82f34888962811f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <gdk/gdkpixbuf.h>
#include <stdint.h>
#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);