changes
This commit is contained in:
parent
61400ce031
commit
2f3c65ae9f
@ -51,9 +51,6 @@ func glitchImage(inputFile string, outputFile string, shitSize int64, iterations
|
|||||||
}
|
}
|
||||||
|
|
||||||
func copyImage(inputFile string, outputFile string) error {
|
func copyImage(inputFile string, outputFile string) error {
|
||||||
// Ensure the output directory exists
|
|
||||||
makeOutputDir()
|
|
||||||
|
|
||||||
// Prepend the "output" directory to the output file
|
// Prepend the "output" directory to the output file
|
||||||
outputFilePath := filepath.Join("output", outputFile)
|
outputFilePath := filepath.Join("output", outputFile)
|
||||||
|
|
||||||
|
6
main.go
6
main.go
@ -6,6 +6,12 @@ import (
|
|||||||
"strconv"
|
"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
|
const MAX_SIZE = 1000000
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
7
util.go
7
util.go
@ -37,3 +37,10 @@ func clearOutputDir() {
|
|||||||
check(err, "cannot remove directory")
|
check(err, "cannot remove directory")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func printUsage() {
|
||||||
|
fmt.Println("Usage: go run main.go <source-file> <number-of-copies> <shit-size> <iterations>")
|
||||||
|
fmt.Println(`
|
||||||
|
source-file:
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user