// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2007 Authors: * Christopher Brown * Ted Gould * * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ #include "extension/effect.h" #include "extension/system.h" #include "unsharpmask.h" #include namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void Unsharpmask::applyEffect(Magick::Image* image) { double amount = _amount / 100.0; image->unsharpmask(_radius, _sigma, amount, _threshold); } void Unsharpmask::refreshParameters(Inkscape::Extension::Effect* module) { _radius = module->get_param_float("radius"); _sigma = module->get_param_float("sigma"); _amount = module->get_param_float("amount"); _threshold = module->get_param_float("threshold"); } #include "../clear-n_.h" void Unsharpmask::init() { // clang-format off Inkscape::Extension::build_from_mem( "\n" "" N_("Unsharp Mask") "\n" "org.inkscape.effect.bitmap.unsharpmask\n" "5.0\n" "5.0\n" "50.0\n" "5.0\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Sharpen selected bitmap(s) using unsharp mask algorithms") "\n" "\n" "\n", new Unsharpmask()); // clang-format on } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */