Porting options to command line imagemagick issues
Posted: 2013-07-05T07:44:45-07:00
I want to replace the color in one image to another, while por. I am doing this using the following command:
This works fine. However, when I put that script in a quick bash sh file, the contents of which are:
and I run 'sh test.sh ffffff', I get the error "unable to open image `'#ff00ff'' and "no decode delegate for this image format `'#ff00ff''.
Does anyone have any ideas? I've tried checking the literature and the command line works great assuming no options, but i'm not sure if there's something stupid i'm doing.
Code: Select all
convert image1.png -fill '#ffffff' -opaque '#ff00ff' image2.png
Code: Select all
#!/bin/bash
convert image1.png -fill "'#"$1"'" -opaque '#ff00ff' image2.png
Does anyone have any ideas? I've tried checking the literature and the command line works great assuming no options, but i'm not sure if there's something stupid i'm doing.