Page 1 of 1

How do I run this script?

Posted: 2017-05-15T19:09:30-07:00
by jottocraft
I know this is a dumb question, but I can't seem to figure out how to run this script. I can't have multiple lines in the command prompt to run this. I'm on Windows.

Code: Select all

convert myimage.png \
  -adaptive-resize '144x168>' \
  -fill '#FFFFFF00' -opaque none \
  -dither FloydSteinberg \
  -remap pebble_colors_64.gif \
  -define png:compression-level=9 -define png:compression-strategy=0 \
  -define png:exclude-chunk=all \
  myimage.pbl.png

Re: How do I run this script?

Posted: 2017-05-15T19:14:29-07:00
by fmw42
The command is not a script, it is just a one-line command written on multiple lines to make it easier to read. It is in unix format. If you change all the \ to ^, then it will run in Windows. So after changing (be sure there are no spaces after the ^) and copy and paste it in the CMD window. Or remove all the \ and new lines and make it into one long line, then copy and past it into your CMD window.

Re: How do I run this script?

Posted: 2017-05-15T19:21:53-07:00
by jottocraft
Thanks, but I'm getting this error now:

convert: invalid argument for option '-adaptive-resize': '144x168 @ error/convert.c/ConvertImageCommand/667.

I ran it like this: convert myimage.png -adaptive-resize '144x168>' -fill '#FFFFFF00' -opaque none -dither FloydSteinberg -remap pebble_colors_64.gif -define png:compression-level=9 -define png:compression-strategy=0 -define png:exclude-chunk=all myimage.pbl.png

Re: How do I run this script?

Posted: 2017-05-15T19:33:17-07:00
by jottocraft
I also got these after removing the part that gave me the error

convert: unable to open image ''#FFFFFF00'': No such file or directory @ error/blob.c/OpenBlob/3094.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/509.

Re: How do I run this script?

Posted: 2017-05-15T19:57:42-07:00
by fmw42
Change all single quotes to double quotes for Windows.

Re: How do I run this script?

Posted: 2017-05-15T20:06:09-07:00
by jottocraft
Thanks, it worked perfectly!
:)

Re: How do I run this script?

Posted: 2017-05-15T20:18:22-07:00
by fmw42
This may help you in the future. See http://www.imagemagick.org/Usage/windows/