image

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dimensions

type Dimensions = image.Dimensions

Dimensions are the width and height of an image, in pixels.

type Image

type Image struct {
	Storage      Storage           `json:"storage"`
	Filename     string            `json:"filename"`
	Filesize     int               `json:"filesize"`
	Dimensions   Dimensions        `json:"dimensions"`
	Names        map[string]string `json:"names"`
	Descriptions map[string]string `json:"descriptions"`
	Tags         Tags              `json:"tags"`
}

Image represents a single image.

func (Image) Clone added in v0.0.2

func (img Image) Clone() Image

Clone returns a deep copy of the image.

func (Image) Normalize

func (img Image) Normalize() Image

Normalize checks if the "Names", "Descriptions", and/or "Tags" fields of the Image are nil. If so, they are initialized with an empty map/slice.

type Storage

type Storage = file.Storage

type Tags added in v0.0.10

type Tags = image.Tags

Tags are the tags of an Image.

func NewTags added in v0.0.10

func NewTags(tags ...string) Tags

NewTags returns new Tags with the given tags. Duplicates are removed.

Jump to

Keyboard shortcuts

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