Le mardi 19 mai 2015 10:12:46, Luca Delucchi a écrit : > Hi devs, > > I noticed something strange about the position of EXTRA_IMAGES with > different DPI values. > > If I set a value lower than 73 the EXTRA_IMAGE it is added in the > right place, but If I increase the value the EXTRA_IMAGE it is moved > up from the correct point. > > Is this normal or a bug? > Is there any way to avoid this shift from the correct position?
Luca, According to the doc, "x and y are in user units from the lower left corner of the page" If you set a DPI < 72, GDAL will correct it to DPI = 72 since AFAIR, this is the minimum accepted value by the PDF spec (not sure of that though). And since 1 user unit = DPI / 72, if you increase the DPI, you must divide the offset by DPI / 72 so that the image stays at the same location in term of pixels. From the PDF spec: """UserUnit number (Optional; PDF 1.6) A positive number giving the size of default user space units, in multiples of 1 ⁄ 72 inch. The range of supported values is implementation-dependent; see implementation note 177 in Appendix H. Default value: 1.0 (user unit is 1 ⁄ 72 inch). """ Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
