Rasterizing a vector (.svg) into a portable bitmap (.png) or (.jpg) is a common design step. However, standard online generators often spit out fuzzy images. Here is how coordinates map during this conversion:
Why SVG Rasterization Goes Blurry
To turn mathematical curves into static pixels, the conversion tool must draw the graphic onto a virtual grid (e.g., HTML5 Canvas).
- If the tool extracts the SVG's *default* dimensions (e.g. $100px imes 100px$) and converts it directly, it yields a $100 imes 100$ pixel bitmap.
- When viewed on a high-density screen, this low-resolution png stretches, producing a blurry image.
The "Scale Multiplier" Formula
To maintain impeccable sharpness, you must export vectors at 2x or 3x scale. The converter must recalculate the geometry:
- Desired box screen size: $100 imes 100$
- Target Export Dimension: $200 imes 200$ (for 2x retina) or $300 imes 300$ (for 3x)
By configuring the canvas's scale multiplier before rendering, the SVG geometry scales mathematically first, drafting perfectly crisp paths onto the higher resolution canvas before spitting out the PNG. Always use transparent PNG layers as target buffers to preserve clean transparency alpha channels!