}
}
strncpy(name, outfile, dotpos);
- sprintf(name+dotpos, "_%d.pgx", compno);
+ sprintf(name+dotpos, "_%u.pgx", compno);
fdest = fopen(name, "wb");
/* don't need name anymore */
char *s;
char c;
- *out_n = 0; s = start;
+ *out_n = 0;
s = skip_white(start);
if(s == NULL) return NULL;
{
const char *tt = (triple?"RGB_ALPHA":"GRAYSCALE_ALPHA");
- fprintf(fdest, "P7\n# OpenJPEG-%s\nWIDTH %d\nHEIGHT %d\nDEPTH %d\n"
+ fprintf(fdest, "P7\n# OpenJPEG-%s\nWIDTH %d\nHEIGHT %d\nDEPTH %u\n"
"MAXVAL %d\nTUPLTYPE %s\nENDHDR\n", opj_version(),
wr, hr, ncomp, max, tt);
alpha = image->comps[ncomp - 1].data;
const size_t dotpos = olen - 4;
strncpy(destname, outfile, dotpos);
- sprintf(destname+dotpos, "_%d.pgm", compno);
+ sprintf(destname+dotpos, "_%u.pgm", compno);
}
else
sprintf(destname, "%s", outfile);
for(compno = 0; compno < image->numcomps; compno++)
{
- fprintf(stdout,"Component %d characteristics: %dx%dx%d %s\n", compno, image->comps[compno].w,
+ fprintf(stdout,"Component %u characteristics: %dx%dx%d %s\n", compno, image->comps[compno].w,
image->comps[compno].h, image->comps[compno].prec, image->comps[compno].sgnd==1 ? "signed": "unsigned");
w = (int)image->comps[compno].w;