diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-06-15 19:08:10 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-06-22 14:59:48 +0100 |
commit | 5f0b9ee26becaf5153e8822cdc964b5d89050321 (patch) | |
tree | 7142ef56365ad9768d58e5402e66a2d3896e8a6c /source/tools | |
parent | 2764ef8c0fd10d16a41842e8834efb1bd17e65d8 (diff) | |
download | mupdf-5f0b9ee26becaf5153e8822cdc964b5d89050321.tar.xz |
Add PSD device
Diffstat (limited to 'source/tools')
-rw-r--r-- | source/tools/mudraw.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index aebe441e..34f9778f 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -30,7 +30,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz); enum { OUT_NONE, OUT_PNG, OUT_TGA, OUT_PNM, OUT_PGM, OUT_PPM, OUT_PAM, - OUT_PBM, OUT_PKM, OUT_PWG, OUT_PCL, OUT_PS, + OUT_PBM, OUT_PKM, OUT_PWG, OUT_PCL, OUT_PS, OUT_PSD, OUT_TEXT, OUT_HTML, OUT_STEXT, OUT_TRACE, OUT_SVG, #if FZ_ENABLE_PDF @@ -59,10 +59,11 @@ static const suffix_t suffix_table[] = { ".svg", OUT_SVG }, { ".pwg", OUT_PWG }, { ".pcl", OUT_PCL }, - { ".ps", OUT_PS }, #if FZ_ENABLE_PDF { ".pdf", OUT_PDF }, #endif + { ".psd", OUT_PSD }, + { ".ps", OUT_PS }, { ".tga", OUT_TGA }, { ".txt", OUT_TEXT }, @@ -117,6 +118,7 @@ static const format_cs_table_t format_cs_table[] = { OUT_PWG, CS_RGB, { CS_MONO, CS_GRAY, CS_RGB, CS_CMYK } }, { OUT_PCL, CS_MONO, { CS_MONO, CS_RGB } }, { OUT_PS, CS_RGB, { CS_GRAY, CS_RGB, CS_CMYK } }, + { OUT_PSD, CS_CMYK, { CS_GRAY, CS_GRAY_ALPHA, CS_RGB, CS_RGB_ALPHA, CS_CMYK, CS_CMYK_ALPHA } }, { OUT_TGA, CS_RGB, { CS_GRAY, CS_GRAY_ALPHA, CS_RGB, CS_RGB_ALPHA } }, { OUT_TRACE, CS_RGB, { CS_RGB } }, @@ -787,6 +789,8 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in bander = fz_new_pkm_band_writer(ctx, out); else if (output_format == OUT_PS) bander = fz_new_ps_band_writer(ctx, out); + else if (output_format == OUT_PSD) + bander = fz_new_psd_band_writer(ctx, out); else if (output_format == OUT_TGA) bander = fz_new_tga_band_writer(ctx, out, colorspace == fz_device_bgr(ctx)); else if (output_format == OUT_PWG) @@ -1563,9 +1567,9 @@ int mudraw_main(int argc, char **argv) if (band_height) { - if (output_format != OUT_PAM && output_format != OUT_PGM && output_format != OUT_PPM && output_format != OUT_PNM && output_format != OUT_PNG && output_format != OUT_PBM && output_format != OUT_PKM && output_format != OUT_PCL && output_format != OUT_PS) + if (output_format != OUT_PAM && output_format != OUT_PGM && output_format != OUT_PPM && output_format != OUT_PNM && output_format != OUT_PNG && output_format != OUT_PBM && output_format != OUT_PKM && output_format != OUT_PCL && output_format != OUT_PS && output_format != OUT_PSD) { - fprintf(stderr, "Banded operation only possible with PAM, PBM, PGM, PKM, PPM, PNM, PCL, PS and PNG outputs\n"); + fprintf(stderr, "Banded operation only possible with PAM, PBM, PGM, PKM, PPM, PNM, PCL, PS, PSD and PNG outputs\n"); exit(1); } if (showmd5) |