summaryrefslogtreecommitdiffstats
path: root/src/images.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-23 19:07:56 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-23 19:07:56 +0400
commit331f6807e9ef813755f8ec197cc24915c458a684 (patch)
treecea02bcfeb75d0243fb599ecfc982c41e625e1f3 /src/images.h
parent9bee3171888d00c741e58a7c3532bd04ed7b48c1 (diff)
downloadrspamd-331f6807e9ef813755f8ec197cc24915c458a684.tar.gz
rspamd-331f6807e9ef813755f8ec197cc24915c458a684.zip
* Move images library to core rspamd
* Add lua api to access images properties
Diffstat (limited to 'src/images.h')
-rw-r--r--src/images.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/images.h b/src/images.h
new file mode 100644
index 000000000..2a79e4edd
--- /dev/null
+++ b/src/images.h
@@ -0,0 +1,25 @@
+#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;
+};
+
+void process_images (struct worker_task *task);
+const char *image_type_str (enum known_image_types type);
+
+#endif /* IMAGES_H_ */