suggestion for blur and other effects

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

suggestion for blur and other effects

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: suggestion for blur and other effects

Post by magick »

We will have a patch for the problem you reported in ImageMagick 6.3.7-3 Beta sometime tomorrow. Thanks.
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Re: suggestion for blur and other effects

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: suggestion for blur and other effects

Post 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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Re: suggestion for blur and other effects

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: suggestion for blur and other effects

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply