aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-06 18:06:29 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-06 18:06:29 +0000
commite8d00fedfe7e0c5e306178499c64aaa697c34639 (patch)
tree8bf45fe518824fa4de7446d02c17dcd73413ccfd /src
parentd9ea57040d27fe859166d59ba7d9edb3b5121d5d (diff)
downloadrspamd-e8d00fedfe7e0c5e306178499c64aaa697c34639.tar.gz
rspamd-e8d00fedfe7e0c5e306178499c64aaa697c34639.zip
[Fix] Do not greyscale images
Diffstat (limited to 'src')
-rw-r--r--src/libmime/images.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libmime/images.c b/src/libmime/images.c
index 7e2185f57..a65c580bb 100644
--- a/src/libmime/images.c
+++ b/src/libmime/images.c
@@ -263,11 +263,10 @@ rspamd_image_normalize (struct rspamd_task *task, struct rspamd_image *img)
}
dst = gdImageScale (src, nw, nh);
- gdImageGrayScale (dst);
gdImageDestroy (src);
- img->normalized_data = g_array_new (FALSE, FALSE, sizeof (gint));
- g_array_set_size (img->normalized_data, nh * nw);
+ img->normalized_data = g_array_sized_new (FALSE, FALSE, sizeof (gint),
+ nh * nw);
for (i = 0; i < nh; i ++) {
for (j = 0; j < nw; j ++) {