Fix bug reported by Noel Llopis.

Make sure FreeImage declarations are not used when FreeImage is not available.
This commit is contained in:
castano 2008-05-19 18:23:42 +00:00
parent c01566cd2f
commit fb2b0cb38c
2 changed files with 3 additions and 2 deletions

View File

@ -423,7 +423,7 @@ FloatImage * FloatImage::fastDownSample() const
{
const uint n = w * h;
if (n & 1)
if ((m_width * m_height) & 1)
{
const float scale = 1.0f / (2 * n + 1);

View File

@ -62,9 +62,10 @@ namespace {
} // namespace
#if defined(HAVE_FREEIMAGE)
static Image * loadFreeImage(FREE_IMAGE_FORMAT fif, Stream & s);
static FloatImage * loadFloatFreeImage(FREE_IMAGE_FORMAT fif, Stream & s);
#endif
Image * nv::ImageIO::load(const char * fileName)
{