Answer the question
In order to leave comments, you need to log in
Can't send exec command line to Go correctly, what's wrong?
I'm trying to send commands from go to imagemagic, apparently very little experience, it doesn't work.
Tell me what's wrong?
This is what the command looks like in the imagemagic manual, it works.
composite -compose Dst_Over -tile pattern:checkerboard C:\go_project\src\parsing\2.png C:\go_project\src\parsing\test1.png
app1 :="composite"
args1:="-compose Dst_Over"
args2:="-tile pattern:checkerboard"
args3:="C:\\go_project\\src\\parsing\\2.png"
args4:="C:\\go_project\\src\\parsing\\test1.png"
cmd1 := exec.Command(app1,args1,args2,args3,args4)
stdout, err := cmd1.Output()
if err != nil {
println(err.Error())
}
Answer the question
In order to leave comments, you need to log in
You need it like this:
exec.Command(
"composite",
"-compose","Dst_Over",
"-tile","pattern:checkerboard",
`C:\go_project\src\parsing\2.png`,
`C:\go_project\src\parsing\test1.png`,
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question