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 "unsharpmask.h"
20
Unsharpmask::applyEffect(Magick::Image* image) {
21
float amount = _amount / 100.0;
22
image->unsharpmask(_radius, _sigma, amount, _threshold);
26
Unsharpmask::refreshParameters(Inkscape::Extension::Effect* module) {
27
_radius = module->get_param_float("radius");
28
_sigma = module->get_param_float("sigma");
29
_amount = module->get_param_float("amount");
30
_threshold = module->get_param_float("threshold");
33
#include "../clear-n_.h"
36
Unsharpmask::init(void)
38
Inkscape::Extension::build_from_mem(
39
"<inkscape-extension>\n"
40
"<name>" N_("Unsharp Mask") "</name>\n"
41
"<id>org.inkscape.effect.bitmap.unsharpmask</id>\n"
42
"<param name=\"radius\" gui-text=\"" N_("Radius") "\" type=\"float\" min=\"0.0\" max=\"50.0\">5.0</param>\n"
43
"<param name=\"sigma\" gui-text=\"" N_("Sigma") "\" type=\"float\" min=\"0.0\" max=\"50.0\">5.0</param>\n"
44
"<param name=\"amount\" gui-text=\"" N_("Amount") "\" type=\"float\" min=\"0.0\" max=\"100.0\">50.0</param>\n"
45
"<param name=\"threshold\" gui-text=\"" N_("Threshold") "\" type=\"float\" min=\"0.0\" max=\"50.0\">5.0</param>\n"
47
"<object-type>all</object-type>\n"
49
"<submenu name=\"" N_("Raster") "\" />\n"
51
"<menu-tip>" N_("Sharpen selected bitmap(s) using unsharp mask algorithms.") "</menu-tip>\n"
53
"</inkscape-extension>\n", new Unsharpmask());
56
}; /* namespace Bitmap */
57
}; /* namespace Internal */
58
}; /* namespace Extension */
59
}; /* namespace Inkscape */