diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-09-25 20:10:52 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-09-25 20:10:52 +0000 |
commit | e066c49c58beacddbff5d7561ea3a2e2a7804bc0 (patch) | |
tree | 8bfaf549de089bf15d54e571e5b34988a8bfd5b3 /converter/other | |
parent | 63ea1308a6f5dd25e1060bdd3e07b2f63c20261a (diff) | |
download | netpbm-mirror-e066c49c58beacddbff5d7561ea3a2e2a7804bc0.tar.gz netpbm-mirror-e066c49c58beacddbff5d7561ea3a2e2a7804bc0.tar.xz netpbm-mirror-e066c49c58beacddbff5d7561ea3a2e2a7804bc0.zip |
Eliminate dependency on color dictionary when user does not specify colors by name
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4131 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other')
-rw-r--r-- | converter/other/pgmtoppm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/converter/other/pgmtoppm.c b/converter/other/pgmtoppm.c index 2c0d5524..62a388c2 100644 --- a/converter/other/pgmtoppm.c +++ b/converter/other/pgmtoppm.c @@ -82,9 +82,13 @@ parseCommandLine(int argc, char ** argv, } } else { /* Arguments are color or color range and file name */ + /* For defaults, we use "rgbi:..." instead of the simpler "black" + and "white" so that we don't have unnecessary dependency on a + color dictionary being available. + */ if (argc-1 < 1) { - cmdlineP->colorBlack = "black"; - cmdlineP->colorWhite = "white"; + cmdlineP->colorBlack = "rgbi:0/0/0"; + cmdlineP->colorWhite = "rgbi:1/1/1"; } else { char * buffer = strdup(argv[1]); char * hyphenPos = strchr(buffer, '-'); @@ -93,7 +97,7 @@ parseCommandLine(int argc, char ** argv, cmdlineP->colorBlack = buffer; cmdlineP->colorWhite = hyphenPos+1; } else { - cmdlineP->colorBlack = "black"; + cmdlineP->colorBlack = "rgbi:0/0/0"; cmdlineP->colorWhite = buffer; } } |