- printf("%08xx%08x %d %d %d %d %d\n",header->width, header->height, a,b,c,f,i);
+
+ if(VERBOSE(2)) printf("image mode:%d\n", b);
+ if(VERBOSE(2)) printf("bpp: %d\n", a);
+ if(VERBOSE(2)) printf("compression: %d\n", c);
+ if(VERBOSE(2)) printf("filter: %d\n", f);
+ if(VERBOSE(2)) printf("interlace: %d\n", i);
+
+ if(b!=0 && b!=2 && b!=3 && b!=6) {
+ fprintf(stderr, "Image mode %d not supported!\n", b);
+ if(b == 4) {
+ fprintf(stderr, "(This is a grayscale image with alpha channel-\n");
+ fprintf(stderr, " try converting it into an RGB image with alpha channel)\n");
+ }
+ exit(1);
+ }
+ if(a!=8 && (b==2 || b==6)) {
+ fprintf(stderr, "Bpp %d in mode %d not supported!\n", b, a);
+ exit(1);
+ }
+ if(c!=0) {
+ fprintf(stderr, "Compression mode %d not supported!\n", c);
+ exit(1);
+ }
+ if(f!=0) {
+ fprintf(stderr, "Filter mode %d not supported!\n", f);
+ exit(1);
+ }
+ if(i!=0) {
+ fprintf(stderr, "Interlace mode %d not supported!\n", i);
+ exit(1);
+ }
+ if(VERBOSE(2))
+ printf("%dx%d %d %d %d %d %d\n",header->width, header->height, a,b,c,f,i);