🛠️ToolsShed

SVG → PNG 변환

SVG 벡터 파일을 원하는 해상도의 PNG 래스터 이미지로 변환합니다.

자주 묻는 질문

코드 구현

# Using CairoSVG
import cairosvg

# Basic conversion
cairosvg.svg2png(url="input.svg", write_to="output.png")

# With custom output size (scale 2x for high-DPI)
cairosvg.svg2png(
    url="input.svg",
    write_to="output@2x.png",
    scale=2.0
)

# With explicit pixel dimensions
cairosvg.svg2png(
    url="input.svg",
    write_to="output_800.png",
    output_width=800,
    output_height=600
)

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.