// 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 "medianFilter.h" #include namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void MedianFilter::applyEffect(Magick::Image* image) { image->medianFilter(_radius); } void MedianFilter::refreshParameters(Inkscape::Extension::Effect* module) { _radius = module->get_param_float("radius"); } #include "../clear-n_.h" void MedianFilter::init() { // clang-format off Inkscape::Extension::build_from_mem( "\n" "" N_("Median") "\n" "org.inkscape.effect.bitmap.medianFilter\n" "0\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Replace each pixel component with the median color in a circular neighborhood") "\n" "\n" "\n", new MedianFilter()); // clang-format on } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */