summaryrefslogtreecommitdiff
path: root/fitz/res_pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/res_pixmap.c')
-rw-r--r--fitz/res_pixmap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c
index 1d3d536f..7391c17e 100644
--- a/fitz/res_pixmap.c
+++ b/fitz/res_pixmap.c
@@ -1049,3 +1049,14 @@ fz_pixmap_set_resolution(fz_pixmap *pix, int res)
pix->xres = res;
pix->yres = res;
}
+
+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);
+}