rtimg

package
v0.0.0-...-83601e6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileSize

func GetFileSize(filename string) (int64, error)

func GetProjectDir

func GetProjectDir(filePath string) string

func ReduceImage

func ReduceImage(filePath string, sizeLimit int64) (int64, int, error)

ReduceImage - returns outputSize, q, error

func ReduceJPG

func ReduceJPG(nameIn, nameOut string, limitSize int64) (int64, int, error)

func ReducePNG

func ReducePNG(nameIn, nameOut string, limitSize int64) (int64, int, error)

Types

type ITagname

type ITagname interface {
	GetTag(string) (string, error)
	Source() string
	State() error
}

type TKey

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

func FindKey

func FindKey(path string, tn ITagname) (*TKey, error)

FindKey - tagname will be used only if it failed to find <key> for the path

func (*TKey) Base

func (o *TKey) Base() string

func (*TKey) Data

func (o *TKey) Data() *TKeyData

func (*TKey) Hash

func (o *TKey) Hash() string

func (*TKey) Len

func (o *TKey) Len() int

func (*TKey) Name

func (o *TKey) Name() string

func (*TKey) NextLevel

func (o *TKey) NextLevel() bool

func (*TKey) ProjectDir

func (o *TKey) ProjectDir() string

func (*TKey) Segment

func (o *TKey) Segment(n int) (string, bool)

func (*TKey) Size

func (o *TKey) Size() string

func (*TKey) String

func (o *TKey) String() string

type TKeyData

type TKeyData struct {
	Type          string
	FileSizeLimit int64
}

func CheckImage

func CheckImage(filePath string, tn ITagname) (*TKeyData, error)

Jump to

Keyboard shortcuts

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