Notch on Cygwin -Bug report

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
Post Reply
markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Notch on Cygwin -Bug report

Post by markanini » 2013-08-10T08:32:40-07:00

Probably needs confirmation but the -R and -B parameters seem broken. Acts as if all -L -R -B -U parameters are at 0. -L and -U work as expecterd individually and in combination however.

User avatar
fmw42
Posts: 25046
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Notch on Cygwin -Bug report

Post by fmw42 » 2013-08-10T09:03:53-07:00

There was a typo for -R (right) that I have now fixed. On quick review, I do not see anything else obviously wrong. I do not have time this morning to test further, but I will try to look at it later today. In the mean time, download the updated version and try it again and let me know what you find. If possible provide a link to the image you are testing, so I can test with it also, if needed.

markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Re: Notch on Cygwin -Bug report

Post by markanini » 2013-08-10T09:17:18-07:00

That was quick! :shock:
Unfortunately I see the same behaviour with the updated script.

User avatar
dlemstra
Posts: 1558
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Notch on Cygwin -Bug report

Post by dlemstra » 2013-08-10T09:41:16-07:00

Code: Select all

if [ "$right" != "0" ]; then
	right=`convert xc: -format "%[fx:2*$right]" info:`
	masking="-strokewidth $right -draw \"line $lastcol,0 $lastcol,$lastrow\""
fi
if [ "$bottom" != "0" ]; then
	bottom=`convert xc: -format "%[fx:2*$bottom]" info:`
	masking="-strokewidth $bottom -draw \"line 0,$lastrow $lastcol,$lastrow\""
fi
$masking is missing, it should be:

Code: Select all

if [ "$right" != "0" ]; then
	right=`convert xc: -format "%[fx:2*$right]" info:`
	masking="$masking -strokewidth $right -draw \"line $lastcol,0 $lastcol,$lastrow\""
fi
if [ "$bottom" != "0" ]; then
	bottom=`convert xc: -format "%[fx:2*$bottom]" info:`
	masking="$masking -strokewidth $bottom -draw \"line 0,$lastrow $lastcol,$lastrow\""
fi
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

User avatar
fmw42
Posts: 25046
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Notch on Cygwin -Bug report

Post by fmw42 » 2013-08-10T10:35:50-07:00

dlemstra wrote: $masking is missing, it should be:
[/code]
Thanks dlemstra! I missed that earlier this morning on my quick review before I had to go out. You have a good eye.

I have made the fix and uploaded it. Sorry for the errors.

Let me know if that fixes it. If not I will look further.

Fred

markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Re: Notch on Cygwin -Bug report

Post by markanini » 2013-08-10T10:50:27-07:00

Works fine! Image

User avatar
fmw42
Posts: 25046
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Notch on Cygwin -Bug report

Post by fmw42 » 2013-08-10T10:56:14-07:00

markanini wrote:Works fine! Image
Great! Thanks for notifying me and thanks to dlemstra for catching what I had missed.

Post Reply