/////////////////////////////////////////////////////////////////////////////
-// Name: src/common/imagepng.cpp
+// Name: src/common/imagpng.cpp
// Purpose: wxImage PNG handler
// Author: Robert Roebling
// RCS-ID: $Id$
// For memcpy
#include <string.h>
-#ifdef __SALFORDC__
-#ifdef FAR
-#undef FAR
-#endif
-#endif
-
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
Transparency_Alpha
};
-static const double INCHES_IN_METER = 39.3700787;
-
// ----------------------------------------------------------------------------
// local functions
// ----------------------------------------------------------------------------
switch ( GetResolutionFromOptions(*image, &resX, &resY) )
{
case wxIMAGE_RESOLUTION_INCHES:
- resX *= INCHES_IN_METER;
- resY *= INCHES_IN_METER;
+ {
+ const double INCHES_IN_METER = 10000.0 / 254;
+ resX = int(resX * INCHES_IN_METER);
+ resY = int(resY * INCHES_IN_METER);
+ }
break;
case wxIMAGE_RESOLUTION_CM: