/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
v = *blue + adjustB; ++blue;
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
v = *blue + adjustB; ++blue;
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
- fprintf(fdest, "%c", (unsigned char)v);
- v = *blue++;
- if(v > 255) v = 255; else if(v < 0) v = 0;
+ fprintf(fdest, "%c", (unsigned char)v);
+ v = *blue++;
+ if(v > 255) v = 255; else if(v < 0) v = 0;
fprintf(stderr," is written to the file\n");
}
destname = (char*)malloc(strlen(outfile) + 8);
fprintf(stderr," is written to the file\n");
}
destname = (char*)malloc(strlen(outfile) + 8);
- if (ncomp > 1)
- {
- /*sprintf(destname, "%d.%s", compno, outfile);*/
- const size_t olen = strlen(outfile);
- const size_t dotpos = olen - 4;
-
- strncpy(destname, outfile, dotpos);
- sprintf(destname+dotpos, "_%u.pgm", compno);
- }
+ if (ncomp > 1)
+ {
+ /*sprintf(destname, "%d.%s", compno, outfile);*/
+ const size_t olen = strlen(outfile);
+ const size_t dotpos = olen - 4;
+
+ strncpy(destname, outfile, dotpos);
+ sprintf(destname+dotpos, "_%u.pgm", compno);
+ }
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);
/* netpbm: */
fprintf(fdest, "%c%c",(unsigned char)(v>>8), (unsigned char)v);