summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-01-16 22:50:52 +0100
committerTor Andersson <tor@ghostscript.com>2010-01-16 22:50:52 +0100
commit45fd3f4d72de1f85d65896fb3f007a6a97cc65ac (patch)
treebb2fa834da208d5bf49b272aec9c4977738b6a6c
parent426a16ca2a7843b912d39b3d7d0931dc740a5f55 (diff)
downloadmupdf-45fd3f4d72de1f85d65896fb3f007a6a97cc65ac.tar.xz
Only take md5sum if there is no pnm output file.
-rw-r--r--apps/pdfdraw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c
index 2310dc1d..31d78d39 100644
--- a/apps/pdfdraw.c
+++ b/apps/pdfdraw.c
@@ -153,10 +153,10 @@ static void drawpnm(int pagenum, struct benchmark *loadtimes, struct benchmark *
long start;
long end;
long elapsed;
-
fz_md5 digest;
- fz_md5init(&digest);
+ if (!drawpattern)
+ fz_md5init(&digest);
drawloadpage(pagenum, loadtimes);
@@ -219,7 +219,8 @@ static void drawpnm(int pagenum, struct benchmark *loadtimes, struct benchmark *
}
}
- fz_md5update(&digest, pix->samples, pix->h * pix->w * 4);
+ if (!drawpattern)
+ fz_md5update(&digest, pix->samples, pix->h * pix->w * 4);
pix->y += bh;
if (pix->y + pix->h > bbox.y1)
@@ -228,7 +229,7 @@ static void drawpnm(int pagenum, struct benchmark *loadtimes, struct benchmark *
fz_droppixmap(pix);
- {
+ if (!drawpattern) {
unsigned char buf[16];
fz_md5final(&digest, buf);
for (i = 0; i < 16; i++)