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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址