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)
Click to show internal directories.
Click to hide internal directories.