cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
- if ((f=fopen(fname,"rb"))==NULL) return -1;
+ if ((f=fopen(fname,"rb"))==NULL) {
+ fprintf(stderr, "rfxswf: file open error\n");
+ return -1;
+ }
jpeg_stdio_src(&cinfo,f);
jpeg_read_header(&cinfo, TRUE);
bps = width*4;
break;
default:
+ fprintf(stderr, "rfxswf: unknown bitmap type %d\n", bitmap_flags);
return -1;
}
ncolors = 256;
}
- if ((ncolors<2)||(ncolors>256)||(!t)) return -1; // parameter error
+ if ((ncolors<2)||(ncolors>256)||(!t)) {
+ fprintf(stderr, "rfxswf: unsupported number of colors: %d\n", ncolors);
+ return -1; // parameter error
+ }
swf_SetU8(t,BMF_8BIT);
swf_SetU16(t,width);