image

package
v0.0.0-...-78c6ce3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package image contains methods to manipulate png image files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// contains filtered or unexported fields
}

Type Image contains metadata to associate with the image when it is persisted.

func New

func New(path string, filename string) (*Image, error)

Function New is a factory that creates an initialized Image. Parameter path is the path to an image file that will be processed. Parameter filename is the name of the image file to be processed. Returns an initialized instance or error.

func NewImageFromPath

func NewImageFromPath(path string) (*Image, error)

Function New is a factory that creates an initialized Image. Parameter path is the path and filename to an image file that will be processed. Returns an initialized instance or error.

func (Image) CreatedUtc

func (i Image) CreatedUtc() time.Time

Method Created gets the UTC date/time when the instance was created.

func (Image) FileName

func (i Image) FileName() string

Method FileName gets the name of the image file from the instance.

func (Image) LatLng

func (i Image) LatLng() latlng.LatLng

Method LatLng gets the latitude and longitude for where the image was created.

func (Image) Path

func (i Image) Path() string

Method Path gets the path from the instance.

func (*Image) SetCreatedUtc

func (i *Image) SetCreatedUtc(createdUtc time.Time) error

Method SetCreatedUtc sets the value of the createdUtc in the instance. If there is an error, an error is returned, otherwise nil.

func (*Image) SetFileName

func (i *Image) SetFileName(filename string) error

Method SetFileName sets the value of the name of the image file in the instance. If there is an error, an error is returned, otherwise nil.

func (*Image) SetLatLng

func (i *Image) SetLatLng(latLong latlng.LatLng) error

Method SetLatLng sets latitude and longitude for where the image was created. If there is an error, an error is returned, otherwise nil.

func (*Image) SetPath

func (i *Image) SetPath(path string) error

Method SetPath sets the value of the path in the instance. If there is an error, an error is returned, otherwise nil.

Jump to

Keyboard shortcuts

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