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

#include "config.h"
#include "main.h"

enum known_image_types {
	IMAGE_TYPE_PNG,
	IMAGE_TYPE_JPG,
	IMAGE_TYPE_GIF,
	IMAGE_TYPE_BMP,
	IMAGE_TYPE_UNKNOWN = 9000
};

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

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

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

#endif /* IMAGES_H_ */