summaryrefslogtreecommitdiff
path: root/raster
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2008-07-06 18:23:04 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2008-07-06 18:23:04 +0200
commit0b35db03b4ec45bc97d81c3f45a79f052ceaaacc (patch)
tree6345379465c9e408ac23e8962eadeb020a9ebda0 /raster
parent399326d2b41456f213073de1e4cf176002ea759d (diff)
downloadmupdf-0b35db03b4ec45bc97d81c3f45a79f052ceaaacc.tar.xz
Added support for prefixing filenames when doing pixmap debugging.
Diffstat (limited to 'raster')
-rw-r--r--raster/pixmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/raster/pixmap.c b/raster/pixmap.c
index f328aaee..0e614428 100644
--- a/raster/pixmap.c
+++ b/raster/pixmap.c
@@ -73,7 +73,7 @@ fz_gammapixmap(fz_pixmap *pix, float gamma)
}
void
-fz_debugpixmap(fz_pixmap *pix)
+fz_debugpixmap(fz_pixmap *pix, char *prefix)
{
int hasalpha = pix->n > 1;
FILE *image = NULL;
@@ -88,11 +88,11 @@ fz_debugpixmap(fz_pixmap *pix)
char alphaname[40];
if (pix->n == 1 || pix->n == 2)
- sprintf(imagename, "%04d-image.pgm", i);
+ sprintf(imagename, "%s-%04d-image.pgm", prefix, i);
else
- sprintf(imagename, "%04d-image.ppm", i);
+ sprintf(imagename, "%s-%04d-image.ppm", prefix, i);
if (hasalpha)
- sprintf(alphaname, "%04d-alpha.pgm", i);
+ sprintf(alphaname, "%s-%04d-alpha.pgm", prefix, i);
if (access(imagename, F_OK) == 0 ||
(hasalpha && access(alphaname, F_OK) == 0))