~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/extension/internal/bitmap/reduceNoise.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
8
 
 
9
#include "extension/effect.h"
 
10
#include "extension/system.h"
 
11
 
 
12
#include "reduceNoise.h"
 
13
 
 
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
}
 
26
 
 
27
void
 
28
ReduceNoise::refreshParameters(Inkscape::Extension::Effect* module) {
 
29
        _order = module->get_param_int("order");
 
30
}
 
31
 
 
32
#include "../clear-n_.h"
 
33
 
 
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
}
 
51
 
 
52
}; /* namespace Bitmap */
 
53
}; /* namespace Internal */
 
54
}; /* namespace Extension */
 
55
}; /* namespace Inkscape */