---
title: "将 SVG 转成 PNG"
description: "在 MacOS 上，安装 inkscape（用 brew），然后这样使用："
canonical: https://oozou.com/til/convert-svg-to-png-79
locale: zh-Hans
date: 2020-11-07
topic: macos
---

# 将 SVG 转成 PNG

> 在 MacOS 上，安装 inkscape（用 brew），然后这样使用：

Published: 2020-11-07 · Topic: [macos](https://oozou.com/zh-Hans/til-topics/macos) ([markdown](https://oozou.com/zh-Hans/til-topics/macos.md))

在 MacOS 上，安装 **inkscape**（用 brew），然后这样使用：

```shell
$ inkscape --export-type=png --export-dpi=200 --export-background-opacity=0 file.svg
```

这会创建一个透明背景的 file.png。

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/zh-Hans/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
