aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/images.h
blob: 6d64ea5d13acdcddddf2a4a67d02924066a744bc (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
#ifndef IMAGES_H_
#define IMAGES_H_

#include "config.h"
#include "rspamd.h"

struct html_image;

enum rspamd_image_type {
	IMAGE_TYPE_PNG = 0,
	IMAGE_TYPE_JPG,
	IMAGE_TYPE_GIF,
	IMAGE_TYPE_BMP,
	IMAGE_TYPE_UNKNOWN
};

struct rspamd_image {
	enum rspamd_image_type type;
	GByteArray *data;
	guint32 width;
	guint32 height;
	const gchar *filename;
	struct html_image *html_image;
};

/*
 * Process images from a worker task
 */
void rspamd_images_process (struct rspamd_task *task);

/*
 * Get textual representation of an image's type
 */
const gchar * rspamd_image_type_str (enum rspamd_image_type type);

#endif /* IMAGES_H_ */