2
* Copyright (C) 2007 Authors:
3
* Christopher Brown <audiere@gmail.com>
4
* Ted Gould <ted@gould.cx>
6
* Released under GNU GPL, read the file 'COPYING' for more information
9
#include "extension/effect.h"
10
#include "extension/system.h"
12
#include "adaptiveThreshold.h"
20
AdaptiveThreshold::applyEffect(Magick::Image *image) {
21
image->adaptiveThreshold(_width, _height);
25
AdaptiveThreshold::refreshParameters(Inkscape::Extension::Effect *module) {
26
_width = module->get_param_int("width");
27
_height = module->get_param_int("height");
28
_offset = module->get_param_int("offset");
31
#include "../clear-n_.h"
34
AdaptiveThreshold::init(void)
36
Inkscape::Extension::build_from_mem(
37
"<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
38
"<name>" N_("Adaptive Threshold") "</name>\n"
39
"<id>org.inkscape.effect.bitmap.adaptiveThreshold</id>\n"
40
"<param name=\"width\" gui-text=\"" N_("Width") "\" type=\"int\" min=\"-100\" max=\"100\">5</param>\n"
41
"<param name=\"height\" gui-text=\"" N_("Height") "\" type=\"int\" min=\"-100\" max=\"100\">5</param>\n"
42
"<param name=\"offset\" gui-text=\"" N_("Offset") "\" type=\"int\" min=\"0\" max=\"100\">0</param>\n"
44
"<object-type>all</object-type>\n"
46
"<submenu name=\"" N_("Raster") "\" />\n"
48
"<menu-tip>" N_("Apply adaptive thresholding to selected bitmap(s).") "</menu-tip>\n"
50
"</inkscape-extension>\n", new AdaptiveThreshold());
53
}; /* namespace Bitmap */
54
}; /* namespace Internal */
55
}; /* namespace Extension */
56
}; /* namespace Inkscape */