|
|
@@ -72,7 +72,20 @@ int main(int argc, char *argv[]) |
|
|
|
dstname = argv[i]; |
|
|
|
} |
|
|
|
|
|
|
|
if(!srcname || !dstname) |
|
|
|
{ |
|
|
|
fprintf(stderr, "%s: too few arguments\n", argv[0]); |
|
|
|
printf(MOREINFO, argv[0]); |
|
|
|
return EXIT_FAILURE; |
|
|
|
} |
|
|
|
|
|
|
|
src = pipi_load(srcname); |
|
|
|
if(!src) |
|
|
|
{ |
|
|
|
fprintf(stderr, "%s: could not load `%s'\n", argv[0], srcname); |
|
|
|
return EXIT_FAILURE; |
|
|
|
} |
|
|
|
|
|
|
|
dst = pipi_resize(src, w, h); |
|
|
|
if(bpp == 16) |
|
|
|
pipi_dither_24to16(dst); |
|
|
|