[GIL] Saving DPI in PNG files

Hello, Is it possible to state a DPI setting when saving a PNG file using Boost' Generic Image Library? Thanks, Pete

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

2011/12/2 Mateusz Łoskot
On 2 December 2011 11:59, PB
wrote: 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]
Thanks for the response. We're currently using Boost 1.44. I assume GIL io_new will be in a 1.49 or above release? Pete

On 2 December 2011 12:25, PB
2011/12/2 Mateusz Łoskot
: On 2 December 2011 11:59, PB
wrote: 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]
Thanks for the response. We're currently using Boost 1.44. I assume GIL io_new will be in a 1.49 or above release?
Christian, the author, is in charge here. Perhaps he will pop in and answer. Meanwhile, just grab the code from gil-contributions SVN (io_new + toolbox) and copy to your boost tree (or keep it outside and add the location to includes). Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org

Hi there,
Thanks for the response. We're currently using Boost 1.44. I assume GIL io_new will be in a 1.49 or above release?
I hope to have io_new in as soon as possible. I have great help from Mateusz and things are moving forward. Albeit slowly. Let me know if you have any issues using io_new. Regards, Christian
participants (3)
-
Christian Henning
-
Mateusz Łoskot
-
PB