svg2png

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 3 Imported by: 0

README

これは何?

svgファイルpngファイル に変換するツールです。

インストール

go install github.com/devlights/svg2png/cmd/svg2png

ライブラリとして利用する場合は

go get github.com/devlights/svg2png@latest

使い方

$ svg2png.exe -in SVGファイルパス -out PNGファイルパス
HELP
$ svg2png.exe -help
Usage of svg2png.exe:
  -debug
        debug mode
  -in string
        input file
  -opacity float
        opacity (default 1)
  -out string
        output file (default "out.png")
  -size int
        size in pixels (default 1000)

ビルド時の前提条件

ビルド

Task を使っています。ビルドファイルは Taskfile.yml です。

$ task build

補足

本ツールは github.com/typomedia/rasterize の実装を参考にしました。

素晴らしいアイデアを共有してくれてありがとうございます。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(svgFile string, size int, opacity float64) (image.Image, error)

Convert は、指定されたsvgファイルのデータを image.Image に変換します。

Types

This section is empty.

Directories

Path Synopsis
cmd
svg2png command
svg2png
svg2png

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL