GNOME Bugzilla – Bug 134088
merge IIR and RLE gaussian blur filters
Last modified: 2004-12-22 21:47:04 UTC
I suggest the two filters merge into a single gaussian blur filter with a toggle for RLE/IIR method. They are two separate things using different algorithms. From the hacker perspective. From a user point of view they do the same thing and having more items in the menu makes it slower to navigate and uses up an accelerator. It's an interface polish thing.
Yes, please.
Actually it would make sense to rename the IIR version as simply "Gaussian Blur", and remove the RLE version from the menu. The IIR version is a bit faster for the most common types of images. The RLE version should perhaps be kept in the PDB, because it may give a small but meaningful speedup for some types of scripts, but the minor benefits it has in some situations are not worth making ordinary users pay attention to. I would like to add a few comments about the "Blur" category of filters in general: A) When the simple "Blur" filter is used with a repeat count of more than about 3, the result is indistinguishable from a Gaussian blur, but is computed much more slowly. Thus, repetitive blurring is simply a very slow way of doing a Gaussian blur. On the other hand, this filter is so simple that it is worth having for the common situation of slightly softening a too-sharp image. How about renaming it as "soften", removing the repeat count option, and -- since this is the only option it has -- causing it to run without bringing up a dialog? B) How about renaming "Selective Gaussian Blur" as "Background Blur"? C) Pixelizing is not a kind of blur, so it should be elsewhere. D) These suggestions would make the Blur submenu contain: Soften, Gaussian Blur, Motion Blur, Background Blur, and Tileable Blur. It would also be useful to have a Variable Blur, in which an image map determines the radius of blurring at each point. A few months ago I modified the Blur plug-in (blur.c) to do this, and will contribute the result if there is interest.
I would sggest we merge IIR and RLE blur, add a toggle to the GUI and set IIR as default. The plug-in should also provide the old PDB procedures. But in general I like your proposal.
Okay, I have a merged IIR and RLE basically done, but here is a question. These two plug-ins between them exported four interfaces: gauss-iir, gauss-iir2, gauss-rle, and gauss-rle2. Grepping in the script-fu area shows that gauss-iir and gauss-rle are both widely used, whereas gauss-iir2 and gauss-rle2 (which allow for different horizontal and vertical blurring radius) do not seem to be used at all. How about if the merged version exports three interfaces: gauss-rle, gauss-iir, and gauss, the last taking arguments for horiz. radius, vert. radius, and method (0=iir,1=rle)? The other alternatives are either a) export five interfaces, b) export one and rewrite 40 or so scripts, c) export one and write two simple scripts to do gauss-iir and gauss-rle by calling gauss with the corresponding method argument.
You should not change any PDB procedure because you cannot know what third-party scripts depend on it and we would like to provide a backward-compatible API at least for such important procedures as gaussian blurs.
Before we merge the two plug-ins, we should fix bug #93856.
How about the two old dialogs that these plug-ins still have: gauss_rle_dialog and gauss_iir_dialog? I think it's safe to remove those two, since the `old' interfaces are never called interactively anymore. The two interactive interfaces (plug_in_gauss_iir2 and plug_in_gauss_rle) call gauss_rle/iir_dialog2().
Well, you cannot really know that noone calls them anymore but I agree that they should be deprecated and removed at some point.
Hmm. About a month ago I put together a merged version of IIR and RLE, exporting all four old interfaces plus a new merged one, but I have been sitting on it waiting for some resolution to bug #93856. It may be a long time before that bug is resolved given its current state, and meanwhile the code is getting stale. What would be the best thing to do at this point?
I don't see a very strong link between http://bugzilla.gnome.org/show_bug.cgi?id=93856 and this one. Why not just merge the two so that the effort won't get lost and care about #93856 later?
I think we should do that and merge the plug-ins now. Where's that merged version again?
Created attachment 28126 [details] gauss.c -- merged IIR & RLE blur plug-in source code Here it is. (A patch would be too large.)
I've done some minor changes like changing the name of the enum (the naming scheme for enums is described in HACKING), making use of switches and HIG-ifying the dialog: 2004-06-05 Sven Neumann <sven@gimp.org> * plug-ins/common/plugin-defs.pl * plug-ins/common/Makefile.am * plug-ins/common/gauss_iir.c * plug-ins/common/gauss_rle.c: removed the two gaussian blur plug-ins... * plug-ins/common/gauss.c: and added a merged version done by William Skaggs. Fixes bug #134088.