ximage

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

功能: 说明:

功能: 说明: 1 https://inkscape.org/ 下载 inkscape,跨平台

2 将输入 SVG(in.svg)导出为 PDF(out.pdf)格式:

inkscape --export-filename=out.pdf in.svg

3 将输入文件(in1.svg, in2.svg)导出为 PNG 格式,保留原始名称(in1.png, in2.png):

inkscape --export-type=png in1.svg in2.svg

功能:png转jpeg 说明:

功能:svg转jpeg 说明:

功能:svg转pdf 说明:

功能:svg转png 说明:

功能:svg存储 说明:

Index

Constants

View Source
const (
	FOLDER_IMAGES_TMP = "images_tmp" //临时目录
	LEN_FILENAME      = 8            //
	EXT_SVG           = ".svg"       //后缀
	EXT_PNG           = ".png"       //后缀
	EXT_PDF           = ".pdf"       //后缀
	EXT_JPEG          = ".jpeg"      //后缀
)
View Source
const (
	Inkscape_windows = "C:/Program Files/Inkscape/bin/inkscape"
	Inkscape_ubuntu  = "inkscape"
)
View Source
const (
	JPEG_QUALITY = 95 //jpeg品质
)

Variables

This section is empty.

Functions

func Png_2_jpeg

func Png_2_jpeg(png_filepath string) (string, error)

Png_2_jpeg png转jpeg

func Svg_2_jpeg

func Svg_2_jpeg(content string) (jpg_filepath string, svg_filepath string, err error)

Svg_2_jpeg svg转jpeg 删除过渡的临时文件

func Svg_2_pdf

func Svg_2_pdf(content string) (pdf_filepath string, svg_filepath string, err error)

Svg_2_pdf svg转pdf

func Svg_2_png

func Svg_2_png(content string) (png_filepath string, svg_filepath string, err error)

Svg_2_png svg转png

Types

This section is empty.

Jump to

Keyboard shortcuts

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