png

package
v0.0.0-...-e815181 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SCALE = 2.

ConvertSVG scales the image by 2x

Variables

This section is empty.

Functions

func AddExif

func AddExif(png []byte) ([]byte, error)

func ConvertSVG

func ConvertSVG(ms *xmain.State, page playwright.Page, svg []byte) ([]byte, error)

ConvertSVG converts the given SVG into a PNG. Note that the resulting PNG has 2x the size (width and height) of the original SVG (see generate_png.js)

Types

type Playwright

type Playwright struct {
	PW      *playwright.Playwright
	Browser playwright.Browser
	Page    playwright.Page
}

func InitPlaywright

func InitPlaywright() (Playwright, error)

func (*Playwright) Cleanup

func (pw *Playwright) Cleanup() error

func (*Playwright) RestartBrowser

func (pw *Playwright) RestartBrowser() (Playwright, error)

Jump to

Keyboard shortcuts

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