From 2f3c65ae9fe16a071d9d29bb7c46a035697e32a7 Mon Sep 17 00:00:00 2001 From: Simon Kellet Date: Tue, 14 Jan 2025 00:40:22 +0000 Subject: [PATCH] changes --- glitch.go | 3 --- main.go | 6 ++++++ util.go | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/glitch.go b/glitch.go index fd4adbe..fd6b323 100644 --- a/glitch.go +++ b/glitch.go @@ -51,9 +51,6 @@ func glitchImage(inputFile string, outputFile string, shitSize int64, iterations } func copyImage(inputFile string, outputFile string) error { - // Ensure the output directory exists - makeOutputDir() - // Prepend the "output" directory to the output file outputFilePath := filepath.Join("output", outputFile) diff --git a/main.go b/main.go index 5bbf16f..d156bfd 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,12 @@ import ( "strconv" ) +// TODO: +// - Flags instead of os.Args +// - Interactive UI +// - Check compatability with other image types (PNG etc) +// - better ffmpeg bindings (go package?) + const MAX_SIZE = 1000000 func main() { diff --git a/util.go b/util.go index 998e53c..6a40904 100644 --- a/util.go +++ b/util.go @@ -37,3 +37,10 @@ func clearOutputDir() { check(err, "cannot remove directory") return } + +func printUsage() { + fmt.Println("Usage: go run main.go ") + fmt.Println(` + source-file: + `) +}