SVG ToolsLesson 184Free preview
SVG to PNG
This lesson is part of Web Developer Tools · All levels
Summary
SVG to PNG converts a vector image to a PNG raster at a given pixel size. PNG is suitable for platforms that do not support SVG or when requiring images with a transparent background. Since rasters have fixed resolution, the results need to be scaled up for high-density screens.
Key points
- SVG is a vector, whereas PNG is a raster with fixed pixels
- Render at 2x the size for the retinal screen
- Font and external images must be available at rendering
- Canvas containing SVG from other domains could be exposed to CORS
- PNG supports transparent background
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.