Browse Source

* Better error recovery in genethumb.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2264 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 17 years ago
parent
commit
014b738eae
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      genethumb/genethumb.c

+ 13
- 0
genethumb/genethumb.c View File

@@ -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);


Loading…
Cancel
Save