Documentation ¶
Index ¶
- func CompressJPEG(quality int, imagePath string)
- func Convert(from string) (string, string)
- func EscapeFilePath(file string) string
- func FilerJPEG(files []string) []string
- func FilerJPG(files []string) []string
- func FilerPNG(files []string) []string
- func FilerWEBP(files []string) []string
- func HandleErr(prefix string, err error)
- func ListFiles(root string, skipMap map[string]bool) []string
- func QualityCheck(maxQuality int, file string) bool
- func WouldOverwrite(path, imageType string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressJPEG ¶
CompressJPEG uses jpegoptim to compress the image
func Convert ¶
Convert converts pngs and webps to jpeg this first string returned is the name of the new file the second string returned is the type of the input image (png, webp), as detected from its encoding, not file name
func EscapeFilePath ¶
EscapeFilePath escapes spaces in the filepath used for an exec() call
func ListFiles ¶
ListFiles lists every file in a directory (recursive) and optionally ignores files given in skipMap
func QualityCheck ¶
QualityCheck uses imagemagick to determine the quality of the image and returns true if the quality is above a given threshold
func WouldOverwrite ¶
WouldOverwrite looks to see if the file were to be converted to a jpeg, would it overwite an existing jpg file with the same name
Types ¶
This section is empty.