diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-29 19:19:47 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-29 19:19:47 +0000 |
commit | 380588e187c12000ac8082cb2a20a905d3c422a5 (patch) | |
tree | 296b1324b7a9360646a34ae836b8eb486b7feede /lib/libpam.c | |
parent | f8b633c2be1231a0c194214271caa456dc669ecb (diff) | |
download | netpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.tar.gz netpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.tar.xz netpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.zip |
Release 10.63.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1968 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpam.c')
-rw-r--r-- | lib/libpam.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lib/libpam.c b/lib/libpam.c index 549f4c55..f188f7d6 100644 --- a/lib/libpam.c +++ b/lib/libpam.c @@ -1046,9 +1046,7 @@ pnm_writepaminit(struct pam * const pamP) { switch (PAM_FORMAT_TYPE(pamP->format)) { case PAM_TYPE: - if (pm_plain_output) - pm_error("There is no plain version of PAM. -plain option " - "is not allowed"); + /* See explanation below of why we ignore 'pm_plain_output' here. */ fprintf(pamP->file, "P7\n"); writeComments(pamP); fprintf(pamP->file, "WIDTH %u\n", (unsigned)pamP->width); @@ -1108,6 +1106,23 @@ pnm_writepaminit(struct pam * const pamP) { +/* EFFECT OF -plain WHEN WRITING PAM FORMAT: + + Before Netpbm 10.63 (June 2013), pnm_writepaminit() did a pm_error() here + if 'pm_plain_output' was set (i.e. the user said -plain). But this isn't + really logical, because -plain is a global option for the program and here + we are just writing one image. As a global option, -plain must be defined + to have effect where it makes sense and have no effect where it doesn't. + Note that a program that generates GIF just ignores -plain. Note also that + a program could conceivably generate both a PPM image and a PAM image. + + Note also how we handle the other a user can request plain format: the + 'plainformat' member of the PAM struct. In the case of PAM, we ignore that + member. +*/ + + + void pnm_checkpam(const struct pam * const pamP, enum pm_check_type const checkType, @@ -1291,7 +1306,7 @@ pnm_addopacityrow(const struct pam * const pamP, void pnm_getopacity(const struct pam * const pamP, - bool * const haveOpacityP, + int * const haveOpacityP, unsigned int * const opacityPlaneP) { /* Usage note: this is obsolete since we added 'have_opacity', etc. |