Fix build in win64.

This commit is contained in:
castano 2009-03-02 09:21:07 +00:00
parent 3df66be089
commit db63ba7fa4

View File

@ -66,8 +66,11 @@ int main(int argc, char *argv[])
if (i+1 == argc) break; if (i+1 == argc) break;
i++; i++;
#ifdef HAVE_PNG
if (strcmp("png", argv[i]) == 0) savePNG = true; if (strcmp("png", argv[i]) == 0) savePNG = true;
else if (strcmp("tga", argv[i]) == 0) savePNG = false; else
#endif
if (strcmp("tga", argv[i]) == 0) savePNG = false;
else else
{ {
fprintf(stderr, "Unsupported output format '%s', defaulting to 'tga'.\n", argv[i]); fprintf(stderr, "Unsupported output format '%s', defaulting to 'tga'.\n", argv[i]);
@ -176,10 +179,16 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
#ifdef HAVE_PNG
if (savePNG) if (savePNG)
{
nv::ImageIO::savePNG(stream, &mipmap); nv::ImageIO::savePNG(stream, &mipmap);
}
else else
#endif
{
nv::ImageIO::saveTGA(stream, &mipmap); nv::ImageIO::saveTGA(stream, &mipmap);
}
} }
} }