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
- func Png_2_jpeg(png_filepath string) (string, error)
- func Svg_2_jpeg(content string) (jpg_filepath string, svg_filepath string, err error)
- func Svg_2_pdf(content string) (pdf_filepath string, svg_filepath string, err error)
- func Svg_2_png(content string) (png_filepath string, svg_filepath string, err error)
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 Svg_2_jpeg ¶
Svg_2_jpeg svg转jpeg 删除过渡的临时文件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.