summaryrefslogtreecommitdiff
path: root/source/cbz/muimg.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-06-26 18:42:37 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-07-06 13:34:37 +0200
commit507d31982280185fe4d3fd22d25c6d11aad480c9 (patch)
tree01de723dabb55ea69de4e3586a79fc09578f5f01 /source/cbz/muimg.c
parent40dc2fabdd3bd647c21ee4334bb81f96a2103ff5 (diff)
downloadmupdf-507d31982280185fe4d3fd22d25c6d11aad480c9.tar.xz
Add support for decoding pbm/pgm/ppm/pam images.
Diffstat (limited to 'source/cbz/muimg.c')
-rw-r--r--source/cbz/muimg.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index 91b89dfa..de99679f 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -162,7 +162,10 @@ img_recognize(fz_context *doc, const char *magic)
!fz_strcasecmp(ext, ".gif") || !fz_strcasecmp(ext, ".bmp") ||
!fz_strcasecmp(ext, ".jpx") || !fz_strcasecmp(ext, ".jp2") ||
!fz_strcasecmp(ext, ".j2k") || !fz_strcasecmp(ext, ".wdp") ||
- !fz_strcasecmp(ext, ".hdp") || !fz_strcasecmp(ext, ".jxr"))
+ !fz_strcasecmp(ext, ".hdp") || !fz_strcasecmp(ext, ".jxr") ||
+ !fz_strcasecmp(ext, ".pbm") || !fz_strcasecmp(ext, ".pgm") ||
+ !fz_strcasecmp(ext, ".ppm") || !fz_strcasecmp(ext, ".pam") ||
+ !fz_strcasecmp(ext, ".pnm"))
return 100;
}
if (!strcmp(magic, "png") || !strcmp(magic, "image/png") ||
@@ -175,7 +178,12 @@ img_recognize(fz_context *doc, const char *magic)
!strcmp(magic, "jp2") || !strcmp(magic, "image/jp2") ||
!strcmp(magic, "j2k") || !strcmp(magic, "wdp") ||
!strcmp(magic, "hdp") || !strcmp(magic, "image/vnd.ms-photo") ||
- !strcmp(magic, "jxr") || !strcmp(magic, "image/jxr"))
+ !strcmp(magic, "jxr") || !strcmp(magic, "image/jxr") ||
+ !strcmp(magic, "pbm") || !strcmp(magic, "image/x-portable-bitmap") ||
+ !strcmp(magic, "pgm") || !strcmp(magic, "image/x-portable-greymap") ||
+ !strcmp(magic, "ppm") || !strcmp(magic, "image/x-portable-pixmap") ||
+ !strcmp(magic, "pam") || !strcmp(magic, "image/x-portable-arbitrarymap") ||
+ !strcmp(magic, "pnm"))
return 100;
return 0;