Page 1 of 1

suggestion for blur and other effects

Posted: 2007-12-06T11:16:40-07:00
by RetroJ
Hi,

I'm generating an animation in which I want to vary the amount of certain effects across frames, where some frames will be unaffected. I found that passing a sigma of 0 to GaussianBlur results in a black canvas, so I have to stop blurring at some small nonzero value. This means I can't quite get the even transition from blurred to unblurred that I'm going for. My suggestion is that MagickWand special case for zero in this effect and any others where it makes sense to mean "no affect".

Thank you

Re: suggestion for blur and other effects

Posted: 2007-12-06T12:02:26-07:00
by magick
We will have a patch for the problem you reported in ImageMagick 6.3.7-3 Beta sometime tomorrow. Thanks.

Re: suggestion for blur and other effects

Posted: 2007-12-08T17:03:22-07:00
by RetroJ
Thank you!

I found that giving Wave a 0 wavelength also results in a black canvas. The special case would probably be appropriate there, too.

Re: suggestion for blur and other effects

Posted: 2007-12-11T17:29:55-07:00
by anthony
One solution in the mean time is to use a blur value that is say 0.00001 then 1.00001 etc
in your sequence!

The blur 0 is really a no-op but generally causes a error as it is also mathematically non-sensical. The shadow code for example had to have a 'short-circuit' to not do a blur when the shadow blur factor was zero (to produce a hard shadow).

Re: suggestion for blur and other effects

Posted: 2007-12-12T13:17:15-07:00
by RetroJ
anthony wrote:One solution in the mean time is to use a blur value that is say 0.00001 then 1.00001 etc
in your sequence!

The blur 0 is really a no-op but generally causes a error as it is also mathematically non-sensical. The shadow code for example had to have a 'short-circuit' to not do a blur when the shadow blur factor was zero (to produce a hard shadow).
Yeah, yet I think a DWIM special case for some of these operators makes sense.

Re: suggestion for blur and other effects

Posted: 2007-12-12T16:36:21-07:00
by anthony
I wasn't not suggesting that that be corrected. It was a suggestion for those that need to deal with existing (older) IM versions.

However I can verify that using -blur 0x0 with the current bleeding edge source no longer causes a error, and indeed is a NO-OP operation.