image

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(filenames []string, directory string)

Delete : deletes some images.

Types

type Property

type Property struct {
	Width        int
	Height       int
	Name         string
	RelativePath string
	AbsolutePath string
}

Property : property of the version of an image.

func (*Property) DefineNameAndPaths

func (p *Property) DefineNameAndPaths(filename, fileExtension, suffixVersion, suffixSize, directoryDest string)

DefineNameAndPaths : defines the name and the paths of the image.

func (Property) IsDefined

func (p Property) IsDefined() bool

IsDefined : returns true if the property is defined.

type Sizes

type Sizes struct {
	Size1x Property
	Size2x Property
}

Sizes : different sizes of an image.

func (Sizes) IsDefined

func (s Sizes) IsDefined() bool

IsDefined : returns true if the properties are defined.

type Versions

type Versions struct {
	Full  Sizes
	Small Sizes
	Thumb Sizes
}

Versions : different versions of an image.

func NewVersions

func NewVersions(src string, width, height int, directoryDest string, saveSmallVersion, saveThumbVersion bool) *Versions

NewVersions : returns a new NewVersions struct.

func SaveFill

func SaveFill(src, directoryDest string, width, height int, saveSmallVersion, saveThumbVersion bool) (*Versions, error)

SaveFill : saves different versions of an image to destination.

func SaveFit

func SaveFit(src, directoryDest string, width, height int, saveSmallVersion, saveThumbVersion bool) (*Versions, error)

SaveFit : saves different versions of an image to destination.

func (Versions) All

func (v Versions) All() []Property

All : returns all the properties of the image.

Jump to

Keyboard shortcuts

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