Re: SVG pixel size

2013-07-09 Thread Massimo
Thanks for the answer. I try to better explain the problem with an attached java example. If you run the main method you should get two png image . svgDefImage.png that contain a 1px thin line generated with default target resolution . svg204Image.png that contain a 3px thin line generated with

Re: SVG pixel size

2013-07-09 Thread Luis Bernardo
Lets look at the default case, that creates a 100x100 pixel image. The default target dpi is 72, so 100/72 = 1.38. If you set the target dpi to 204, then the image needs to be 283x283 pixels because 204*1.3 = 283.. Then a 1 pixel line needs to be 2.83 pixels to keep the scaling

Re: SVG pixel size

2013-07-09 Thread Sergiu Dumitriu
The problem is that the pixel is a very wrong/misleading unit. Initially (HTML3) there was no CSS, and no units, so there were just unit-less length: table border=4 would create a table with a 4 pixels wide border [1]. Back then (early-mid 90s), almost all monitors were low resolution, and it was

Re: SVG pixel size

2013-07-09 Thread Sergiu Dumitriu
On 07/09/2013 12:26 PM, Vincent Hennebert wrote: Hi Massimo, the easiest is to have the source resolution match the target resolution. That way, one pixel in your source will become 1 pixel in the output. That said, if you want a real one-pixel line and not something anti-aliased you

Re: SVG pixel size

2013-07-09 Thread Vincent Hennebert
On 09/07/13 18:51, Sergiu Dumitriu wrote: On 07/09/2013 12:26 PM, Vincent Hennebert wrote: Hi Massimo, the easiest is to have the source resolution match the target resolution. That way, one pixel in your source will become 1 pixel in the output. That said, if you want a real one-pixel

Re: SVG pixel size

2013-07-09 Thread Sergiu Dumitriu
On 07/09/2013 01:43 PM, Vincent Hennebert wrote: On 09/07/13 18:51, Sergiu Dumitriu wrote: On 07/09/2013 12:26 PM, Vincent Hennebert wrote: Hi Massimo, the easiest is to have the source resolution match the target resolution. That way, one pixel in your source will become 1 pixel in the

Re: SVG pixel size

2013-07-09 Thread Luis Bernardo
Correct. And since FOP is still in the past and uses 72 instead of 96: 2.125 / 72 * 96 = 2.833 (pixels, which become dots when sent to the printer) On 7/9/13 5:46 PM, Sergiu Dumitriu wrote: So, a pixel is a fixed length that doesn't scale down with the DPI, it should always be 1/96 inches. At