Revision: 8298 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8298&view=rev Author: mdboom Date: 2010-05-06 18:40:31 +0000 (Thu, 06 May 2010)
Log Message: ----------- Fix PNG resolution metadata. Modified Paths: -------------- trunk/matplotlib/src/_png.cpp Modified: trunk/matplotlib/src/_png.cpp =================================================================== --- trunk/matplotlib/src/_png.cpp 2010-05-06 13:32:47 UTC (rev 8297) +++ trunk/matplotlib/src/_png.cpp 2010-05-06 18:40:31 UTC (rev 8298) @@ -140,7 +140,7 @@ // Save the dpi of the image in the file if (args.size() == 5) { double dpi = Py::Float(args[4]); - size_t dots_per_meter = (size_t)(dpi / (2.54 / 100.0)); + size_t dots_per_meter = (size_t)(dpi * 2.54 * 100.0); png_set_pHYs(png_ptr, info_ptr, dots_per_meter, dots_per_meter, PNG_RESOLUTION_METER); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins