image

package
v0.0.0-...-72f9927 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRatio

func GetRatio(dims Dimensions, maxDim float32) float32

GetRatio returns the ratio multiplier for the given dimensions to conform to the given max dimension size.

Types

type Dimensions

type Dimensions struct {
	Width, Height int
}

type TranslatorImage

type TranslatorImage struct {
	Image      *image.RGBA
	Hash       string
	Dimensions Dimensions
	// contains filtered or unexported fields
}

func Open

func Open(file string, url, clip bool) TranslatorImage

Open opens the image at the given path/URL and returns both the image and its sha256 hash. "url" parameter specifies if the given file string is a URL. "clip" parameter specifies if the image should be taken from the clipboard (overrides "url" parameter)

Jump to

Keyboard shortcuts

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