Page 1 of 1

'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T17:16:41-07:00
by lotustwincam
I get the following error using Freds Pagecurl script:

$ pagecurl 1.png 2.png
convert.exe: unable to parse expression `os(pi*47.7278/180)' @ error/fx.c/FxGetSymbol/1868.

Other scripts such as Mottle run fine.

Configuration:
Imagemagick 7.0.6-Q16
Cygwin (bc package is installed)
Windows 7

thanks in advance for any help.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T17:41:14-07:00
by fmw42
My scripts do not work on Windows unless you are using Windows 10 Unix or install Cygwin. They are bash unix scripts. So you must make the call from a Cygwin Bash window and use convert, not convert.exe.

The error is from an fx computation. So bc is not involved. I have no idea why the fx computation would fail other than your wrong command.

See
http://im.snibgo.com/cygwin.htm
https://www.imagemagick.org/discourse-s ... 30#p113836

With IM 7 use magick not convert.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T17:45:02-07:00
by magick
This statement does not grok:

Code: Select all

convert xc: -format "%[fx:($p3x)cos(pi*$angle/180)-($p3y+$len)sin(pi*$angle/180)+$x1]" info:
instead it likely should be

Code: Select all

convert xc: -format "%[fx:($p3x)*cos(pi*$angle/180)-($p3y+$len)*sin(pi*$angle/180)+$x1]" info:
Its possible older versions of the parser assumed an implicit multiply but recent releases have a more pedantic parser.

Fred will likely update the script with this patch within a few days.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T17:50:59-07:00
by fmw42
I found a bug and have fixed it. So download it and try again.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T17:51:57-07:00
by fmw42
Magick pointed it out just as I was posting my last message. That was indeed the bug.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T18:21:37-07:00
by lotustwincam
fmw42:

Thanks for the quick reply. I had included my configuration details to show that I was running the script via Cygwin on a Windows 7 machine. I did mention that one of your other scripts (mottle) was working fine which suggested that my basic setup was ok.

magical:

Thanks also for the quick response. I updated the script as per your suggestion and working fine now.

Re: 'Unable to Parse' error using Freds Pagecurl script

Posted: 2019-10-08T18:33:07-07:00
by fmw42
I saw your comment. But I was originally confused by the .exe on convert.exe on the error message. I just wanted to be sure you were actually running it under Cygwin and not Windows.