diff options
author | Sebastian Rasmussen <sebras@hotmail.com> | 2008-07-06 18:23:04 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@hotmail.com> | 2008-07-06 18:23:04 +0200 |
commit | 0b35db03b4ec45bc97d81c3f45a79f052ceaaacc (patch) | |
tree | 6345379465c9e408ac23e8962eadeb020a9ebda0 /raster | |
parent | 399326d2b41456f213073de1e4cf176002ea759d (diff) | |
download | mupdf-0b35db03b4ec45bc97d81c3f45a79f052ceaaacc.tar.xz |
Added support for prefixing filenames when doing pixmap debugging.
Diffstat (limited to 'raster')
-rw-r--r-- | raster/pixmap.c | 8 |
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)) |