Ok, after looking into this some more, it turned out to be a very silly mistake. My ImageMagick installation wasn't being found by my script. Adding the path solved the problem, and I was able to simplify everything a bit. This one works from the Finder Services and does exactly what I want. I was helped by this answer: https://apple.stackexchange.com/a/119109/288589 [EDIT] To get the right transparent background, as @boris42 mentioned, change the shell script to the new example. [![Working solution with transparent background][1]][1] [1]: https://i.sstatic.net/pbM8s.png