summaryrefslogtreecommitdiff
path: root/fitz/image_md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/image_md5.c')
-rw-r--r--fitz/image_md5.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fitz/image_md5.c b/fitz/image_md5.c
new file mode 100644
index 00000000..86ba0a12
--- /dev/null
+++ b/fitz/image_md5.c
@@ -0,0 +1,11 @@
+#include "fitz-internal.h"
+
+void fz_md5_pixmap(fz_pixmap *pix, unsigned char digest[16])
+{
+ fz_md5 md5;
+
+ fz_md5_init(&md5);
+ if (pix)
+ fz_md5_update(&md5, pix->samples, pix->w * pix->h * pix->n);
+ fz_md5_final(&md5, digest);
+}