Code

updated spanish.nsh and inkscape.nsi to reflect latest file-changes
[inkscape.git] / trunk / src / extension / internal / bitmap / reduceNoise.cpp
1 /*
2  * Copyright (C) 2007 Authors:
3  *   Christopher Brown <audiere@gmail.com>
4  *   Ted Gould <ted@gould.cx>
5  *   
6  * Released under GNU GPL, read the file 'COPYING' for more information
7  */
9 #include "extension/effect.h"
10 #include "extension/system.h"
12 #include "reduceNoise.h"
14 namespace Inkscape {
15 namespace Extension {
16 namespace Internal {
17 namespace Bitmap {
18         
19 void
20 ReduceNoise::applyEffect(Magick::Image* image) {
21         if (_order > -1)
22                 image->reduceNoise(_order);
23         else
24                 image->reduceNoise();
25 }
27 void
28 ReduceNoise::refreshParameters(Inkscape::Extension::Effect* module) {
29         _order = module->get_param_int("order");
30 }
32 #include "../clear-n_.h"
34 void
35 ReduceNoise::init(void)
36 {
37         Inkscape::Extension::build_from_mem(
38                 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
39                         "<name>" N_("Reduce Noise") "</name>\n"
40                         "<id>org.inkscape.effect.bitmap.reduceNoise</id>\n"
41                         "<param name=\"order\" gui-text=\"" N_("Order") "\" type=\"int\" min=\"-1\" max=\"100\">-1</param>\n"
42                         "<effect>\n"
43                                 "<object-type>all</object-type>\n"
44                                 "<effects-menu>\n"
45                                         "<submenu name=\"" N_("Raster") "\" />\n"
46                                 "</effects-menu>\n"
47                                 "<menu-tip>" N_("Reduce noise in selected bitmap(s) using a noise peak elimination filter.") "</menu-tip>\n"
48                         "</effect>\n"
49                 "</inkscape-extension>\n", new ReduceNoise());
50 }
52 }; /* namespace Bitmap */
53 }; /* namespace Internal */
54 }; /* namespace Extension */
55 }; /* namespace Inkscape */