diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /lib/colorname.h | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/colorname.h')
-rw-r--r-- | lib/colorname.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/colorname.h b/lib/colorname.h index 74583144..492df951 100644 --- a/lib/colorname.h +++ b/lib/colorname.h @@ -4,6 +4,7 @@ #include <string.h> #include <stdio.h> #include <netpbm/ppm.h> +#include <netpbm/pam.h> #ifdef __cplusplus extern "C" { @@ -15,14 +16,19 @@ extern "C" { enum colornameFormat {PAM_COLORNAME_ENGLISH = 0, PAM_COLORNAME_HEXOK = 1}; +#define PAM_COLORFILE_MAXVAL 255 + struct colorfile_entry { long r, g, b; + /* Red, green, and blue components of color based on maxval + PAM_COLORFILE_MAXVAL + */ char * colorname; }; -void +void pm_canonstr(char * const str); FILE * @@ -32,7 +38,11 @@ struct colorfile_entry pm_colorget(FILE * const f); void -pm_parse_dictionary_name(const char colorname[], +pm_parse_dictionary_namen(char const colorname[], + tuplen const color); + +void +pm_parse_dictionary_name(const char colorname[], pixval const maxval, int const closeOk, pixel * const colorP); |