From d88b0dd60ca61c90fd03df63e2130b58475d63f1 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 2 Feb 2017 19:59:17 +0000 Subject: Add -I option to mupdf to invert colors. --- platform/x11/win_main.c | 4 +++- platform/x11/x11_main.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'platform/x11') diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index 6a0d8a00..76455eea 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1211,6 +1211,7 @@ static void usage(void) fprintf(stderr, "\t-C -\tRRGGBB (tint color in hexadecimal syntax)\n"); fprintf(stderr, "\t-W -\tpage width for EPUB layout\n"); fprintf(stderr, "\t-H -\tpage height for EPUB layout\n"); + fprintf(stderr, "\t-I -\tinvert colors\n"); fprintf(stderr, "\t-S -\tfont size for EPUB layout\n"); fprintf(stderr, "\t-U -\tuser style sheet for EPUB layout\n"); fprintf(stderr, "\t-X\tdisable document styles for EPUB layout\n"); @@ -1241,7 +1242,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow argv = fz_argv_from_wargv(argc, wargv); - while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:Xb:")) != -1) + while ((c = fz_getopt(argc, argv, "Ip:r:A:C:W:H:S:U:Xb:")) != -1) { switch (c) { @@ -1254,6 +1255,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow break; case 'p': password = fz_optarg; break; case 'r': displayRes = fz_atoi(fz_optarg); break; + case 'I': gapp.invert = 1; break; case 'A': fz_set_aa_level(ctx, fz_atoi(fz_optarg)); break; case 'W': gapp.layout_w = fz_atoi(fz_optarg); break; case 'H': gapp.layout_h = fz_atoi(fz_optarg); break; diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index ace1a9ef..421672de 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -812,6 +812,7 @@ static void usage(void) fprintf(stderr, "\t-C -\tRRGGBB (tint color in hexadecimal syntax)\n"); fprintf(stderr, "\t-W -\tpage width for EPUB layout\n"); fprintf(stderr, "\t-H -\tpage height for EPUB layout\n"); + fprintf(stderr, "\t-I -\tinvert colors\n"); fprintf(stderr, "\t-S -\tfont size for EPUB layout\n"); fprintf(stderr, "\t-U -\tuser style sheet for EPUB layout\n"); fprintf(stderr, "\t-X\tdisable document styles for EPUB layout\n"); @@ -846,7 +847,7 @@ int main(int argc, char **argv) pdfapp_init(ctx, &gapp); - while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:Xb:")) != -1) + while ((c = fz_getopt(argc, argv, "Ip:r:A:C:W:H:S:U:Xb:")) != -1) { switch (c) { @@ -859,6 +860,7 @@ int main(int argc, char **argv) break; case 'p': password = fz_optarg; break; case 'r': resolution = atoi(fz_optarg); break; + case 'I': gapp.invert = 1; break; case 'A': fz_set_aa_level(ctx, atoi(fz_optarg)); break; case 'W': gapp.layout_w = fz_atof(fz_optarg); break; case 'H': gapp.layout_h = fz_atof(fz_optarg); break; -- cgit v1.2.3