mediaprocessor

package
v0.0.0-...-fdd49d0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedExtensions = map[string]func(string, string) error{
	".heic": convertToJpg,
	".HEIC": convertToJpg,
	".jpg":  convertToJpg,
	".jpeg": convertToJpg,
	".JPG":  convertToJpg,
	".JPEG": convertToJpg,
	".mov":  convertMovToMp4,
	".MOV":  convertMovToMp4,
	".mp4":  convertMovToMp4,
	".MP4":  convertMovToMp4,
}

SupportedExtensions is a map of supported file extensions and their corresponding processing functions

Functions

func ApplyOrientation

func ApplyOrientation(img image.Image, orientation int) image.Image

func GenerateOrderedFilename

func GenerateOrderedFilename(order int, ext string) string

GenerateOrderedFilename generates a filename with an ordered prefix

func GetOrientation

func GetOrientation(input string) (int, error)

GetOrientation extracts the orientation from an image file

func IsSupported

func IsSupported(filePath string) bool

IsSupported checks if a given file is supported based on its extension

func ProcessLocalMediaFile

func ProcessLocalMediaFile(inputPath, outputPath string) error

ProcessLocalMediaFile handles the processing of a single media file

Types

This section is empty.

Jump to

Keyboard shortcuts

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