screenshot

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateScreenShot

func CreateScreenShot(settings Settings) ([]byte, error)

entry point to create screenshot

Types

type Settings

type Settings struct {
	Url     string  // query url
	Width   int     // width of view port (default 1920)
	Height  int     // height of view port (default 1024)
	Scale   float64 // scale of final image (default 0.1, meaning that with default settings our image will be 192x102px)
	Wait    int     // ms to wait before rendering (default 10000, 10 seconds)
	Timeout int     // ms to wait before returning timeout (default 60000, 60 seconds)
	Quality int     // png quality
	Hash    string  // file hash for this setting to quickly find cached files
	MaxAge  int     // maximum age of cache file in seconds (!) before it gets reloaded (set to 0 to never renew files, default 2592000 = 30 days)
}

struct to define screenshot settings

Jump to

Keyboard shortcuts

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