2011.12.22 17:34 "Re: [Tiff] Tiff Digest, Vol 91, Issue 5", by Richard Nolde

On 12/22/2011 10:00 AM, tiff-request@lists.maptools.org wrote: > 4. Re: Proposed patch for ppm2tiff (Bob Friesenhahn) Both tiffcp and tiffcrop support the same extended mode options for TIFFOpen using getopt parsing.

char mode[10];
char *mp = mode;

     *mp++ = 'w';
     *mp = '\0';

...

       case 'a': mode[0] = 'a';    /* append to output */
         break;
       /* options for file open modes */
       case 'B': *mp++ = 'b'; *mp = '\0';
         break;
       case 'L': *mp++ = 'l'; *mp = '\0';
         break;
       case 'M': *mp++ = 'm'; *mp = '\0';
         break;
       case 'C': *mp++ = 'c'; *mp = '\0';
         break;

Once the mode options are set, the application does not do anything special as this seems to be handled entirely within the library.

Richard Nolde