summaryrefslogtreecommitdiff
path: root/image.h
blob: 1363eed6c6a9ffb44b92facb8cb6feed028ab68c (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
#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);

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);