
On 2 December 2011 11:59, PB
Hello,
Is it possible to state a DPI setting when saving a PNG file using Boost' Generic Image Library?
I assume you will use the next generation IO, it is GIL io_new recently accepted [1] Calculate the following image info details: info._res_x = (your_dpi * 10000 + 127) / 254; info._res_y = info._res_x; info._phy_unit_type = PNG_RESOLUTION_METER; then set info._valid_resolution to true and the writer will store it. I have never had to write it myself, so it's a sort of pseudo-code based on reading GIL source code. [1] http://lists.boost.org/boost-announce/2011/01/0281.php Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org