info

package
v0.0.0-...-e688aee Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 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 *ImageDetails) (string, error)

ImageDetailsToJSON returns a string with JSON representation of the ImageDetails

func SaveImageDetail

func SaveImageDetail(d *ImageDetails, path string) error

SaveImageDetail saves ImageDetails in a JSON file on "path"

Types

type ImageDetails

type ImageDetails 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
}

func (Info) DetailsFromImageMagick

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

func (Info) FileHash

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

func (Info) ImageDetails

func (i Info) ImageDetails() (*ImageDetails, 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