Search found 25 matches

by creekpeanut
2013-05-22T07:39:20-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Looks like the same issue echo "------Script 1----------" width=$(convert rose: -format "%w" info: | tr -d "\n") echo "width=${width}" xx=$((width-1)) echo "xx=${xx}" ------Script 1---------- width=70 ")syntax error: invalid arithmetic operator ...
by creekpeanut
2013-05-21T12:32:48-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Thank you for the help.
by creekpeanut
2013-05-21T12:04:53-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

No spaces at all.

I did notice a space in the script below
Here is a new pic.

Image
by creekpeanut
2013-05-21T11:31:24-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

I am using the UNIX line ending built into Notepad++

Here is the image fro the output.

Image
by creekpeanut
2013-05-21T10:52:45-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

All of the samples return the following.

Code: Select all

;0
")syntax error: invalid arithmetic operator (error token is "
;
by creekpeanut
2013-05-21T10:46:27-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

All of the samples return the following

Code: Select all

$ ./test
70
")syntax error: invalid arithmetic operator (error token is "

My pc is a Windows 7 32bit
by creekpeanut
2013-05-21T07:23:35-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

It seems it is returning the correct value of 1 but it is not returned as an int but is returned as a 2 character string angle=25 # compute crop of input into front and side sign=$(convert -limit thread 1 xc: -format "%[fx:$angle<0?0:1]" info:) echo "sign=$sign" xx=$((sign+1)) ec...
by creekpeanut
2013-05-20T14:31:15-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

This is the only one that does work.
angle=25
# compute crop of input into front and side
sign=`echo "$angle>0" | bc`
echo "sign=$sign"
xx=$((sign+1))
echo $xx
I have not tried to recompile the code. I am not to sure how to do this.
by creekpeanut
2013-05-20T13:03:47-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Try angle=25 # compute crop of input into front and side sign=$(convert xc: -format "%[fx:$angle<0?0:1]" info:) echo "sign=$sign" xx=`expr $sign + 1` echo $xx sign=1 expr: non-integer argument or angle=25 # compute crop of input into front and side sign=$(convert xc: -format &qu...
by creekpeanut
2013-05-20T12:08:32-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

try again with angle=25 # compute crop of input into front and side sign=`convert xc: -format "%[fx:$angle<0?0:1]" info:` echo "sign=$sign" xx=`expr $sign + 1` echo $xx $ ./test sign=1 expr: non-integer argument If that fails, then try angle=25 # compute crop of input into front...
by creekpeanut
2013-05-20T07:16:28-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Here is what I get from running the first script. First run has failed with expr: non-integer argument testbox@printdemo ~ $ angle=25 testbox@printdemo ~ $ # compute crop of input into front and side echo "sign=$sign" xx=`expr $$ sign + 1` testbox@printdemo ~ sign=`convert xc: -format &quo...
by creekpeanut
2013-05-17T14:39:08-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Sorry about that. Running all of the statements you had above worked great with no issue. The echo "Length of sign:" ${#sign} is something I did to see the length of the returned value from "sign=`convert xc: -format "%[fx:$angle<0?0:1]" info:`" It seemed kinda strange ...
by creekpeanut
2013-05-17T14:27:15-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

So I think I know what the issue is but can not seem to figure out how to resolve it. Take for example this small code from 3Dcover. #!/bin/bash angle=25 # compute crop of input into front and side sign=`convert xc: -format "%[fx:$angle<0?0:1]" info:` echo "sign value:" $sign ech...
by creekpeanut
2013-05-16T12:39:30-07:00
Forum: Fred's Scripts
Topic: Fred's ImageMagick Scripts
Replies: 65
Views: 287104

Re: Fred's ImageMagick Scripts

Seems my issue just could my cygwin setup. I think I am just missing some packages to be installed. I did figure out one of the issues is with this line of code sign=`convert xc: -format "%[fx:$angle<0?0:1]" info:` it is suppose to return return an integer of 1 in this current context. the...