summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2009-03-02 01:47:55 +0100
committerSebastian Rasmussen <sebras@hotmail.com>2009-03-02 01:47:55 +0100
commit2b02f0965e580925bfa41b2c19a0f38ac4205e3e (patch)
tree05f85d93c9e329305714651e6ee7f8c7ef710c35 /apps
parent22eeb653463d68f79a746a54b12a398442f26d1e (diff)
downloadmupdf-2b02f0965e580925bfa41b2c19a0f38ac4205e3e.tar.xz
Handle single image filters when printing information.
Diffstat (limited to 'apps')
-rw-r--r--apps/pdftool.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/pdftool.c b/apps/pdftool.c
index 8f637348..cedc4412 100644
--- a/apps/pdftool.c
+++ b/apps/pdftool.c
@@ -1831,12 +1831,15 @@ printinfo(char *filename, int show, int page)
image[i]->page,
fz_tonum(image[i]->pageref), fz_togen(image[i]->pageref));
- for (j = 0; j < fz_arraylen(image[i]->u.image.filter); j++)
- {
- printf("%s%s",
- fz_toname(fz_arrayget(image[i]->u.image.filter, j)),
- j == fz_arraylen(image[i]->u.image.filter) - 1 ? "" : " ");
- }
+ if (fz_isarray(image[i]->u.image.filter))
+ for (j = 0; j < fz_arraylen(image[i]->u.image.filter); j++)
+ {
+ printf("%s%s",
+ fz_toname(fz_arrayget(image[i]->u.image.filter, j)),
+ j == fz_arraylen(image[i]->u.image.filter) - 1 ? "" : " ");
+ }
+ else
+ printf("%s", fz_toname(image[i]->u.image.filter));
printf(" ] %dx%d %dbpc %s%s%s (%d %d R)\n",
fz_toint(image[i]->u.image.width),