The main way to define how a SVG should be displayed is two attributes of the root element: "width" and "height" attributes. Also, it was designed to be embedded in webpages. That means that by definition, it does not care about scale or units. The unit is either unspecified (so that you can just state that the width/height ratio should change for print, but not tell anything about the size), or meter. The base PNG format does not deal with real-life units, or print, but there is a very widely-used official PNG extension called pHYs (for " pHYsical pixel dimensions", don't ask me why some are uppercase), that allows to specify the number of image pixels per (real-life) unit. PNG images have by definition a size defined in pixels, with a precise width and heigth, and a complete matrix of pixel of that width and height define the PNG content. PNG being a raster image format, it is simpler, so let's deal with that one first. Images when stored in electronic format, like PNG and SVG images, can usually both be printed on paper and displayed on screen. This size, that you can measure on paper, is measured in real-life units, like meters(m), millimeters (10 -3 m), centimeters(10 -2 m), kilometers(10 3 m), ångströms(10 -10m), inches(25.4mm), feet(304.8mm), yards(914.4mm), miles(1,609,344 mm), parsecs, ropes, furlongs, or whatever you want to make up as long as you can convert it from and to meters. There are no pixels, and you will want to specify the size of whatever you want to print. When you have to deal with a printer (or cnc machine, or any machine that deals with physical objects like paper), the deal is different. This is what the "retina" or "HiDPI" screens do: make physical pixels smaller, so that artifacts between pixels will be smaller and less noticeable. This is also important when you want to improve things like antialiasing by making smaller physical pixels. The graphic card will frown and just tell the monitor to light several physical pixels when you ask to display one pixel, so that all the monitor space is used. Ideally you want to keep the same aspect ratio). In all operating system, even if you have a 1920x1080 monitor, you can tell your OS (or rather you graphic card/chipset) to use it as a 1024x768 display (or any other standard size. So far, so good.Ī slight complication is that you can have a screen resolution that does not match the physical resolution of your screen. when you light none, you have a black dot, when you light all, you have a white dot. The three dots are typicaly red, green, and blue. Screen physical pixels are these nice square-like sets of three lights on your monitor (Historical note: there used to exist vector monitors, like oscilloscopes, which did not have pixels). ĭown the rabbit hole: from hardware to software. Despite this, since one of these old-fashioned countries rule the Internet, we're still stuck with them.), monitor pixels, display pixels, SVG user-units-pixel, SVG user-unit-inches, SVG-export-inches or SVG-export-pixels. In most countries your typical ruler only has SI units on it. Note that this unit has been deprecated since the XVIII th century and the introduction of the metric system, but I guess that some countries just like living with antique units. In the short introduction above, there are several types of units involved: real-life inches (the ones you can measure with a ruler on paper. but you have to know what units you are talking about. Yes, it's only a matter of rule of three. After all, it's just down to one-dimensional geometry stuff and can't be much harder than a rule of three, right? Short answer: Right! So I wanted to know what was the deal with units. Recently, I've been asked about how to export to some px dimensions, but "at 72dpi because photoshop wants it that way". There has been some change when I joined the dev team changing some dpi from 90 to 96, between inkscape 0.48.5 and 0.91, but I did not take an interest in those things at the time. As I'm developer and helper on Inkscape, I sometimes get questions about features in Inkscape, how things work, and that prompts me to go see, check, and understand things about the world.
0 Comments
Leave a Reply. |