info

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageDetailsToJSON

func ImageDetailsToJSON(d *ImageProperties) (string, error)

ImageDetailsToJSON returns a string with JSON representation of the ImageDetails

func SaveImageDetail

func SaveImageDetail(d *ImageProperties, path string) error

SaveImageDetail saves ImageDetails in a JSON file on "path"

Types

type ImageProperties added in v1.17.1

type ImageProperties struct {
	Hash        string `json:"hash"`
	Height      int    `json:"height"`
	Width       int    `json:"width"`
	ContentType string `json:"content_type"`
}

type Info

type Info struct {
	Path        string
	ContentType string
}

func (Info) DetailsFromImageMagick

func (i Info) DetailsFromImageMagick() (*ImageProperties, error)

func (Info) FileHash

func (i Info) FileHash() (hash string, err error)

func (Info) ImageDetails

func (i Info) ImageDetails() (*ImageProperties, error)

ImageDetails extracts file hash, height, and width when providing a image path it returns an ImageDetails object

Jump to

Keyboard shortcuts

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