// 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 "contrast.h" #include namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void Contrast::applyEffect(Magick::Image *image) { // the contrast method's argument seems to be binary, so we perform it multiple times // to get the desired level of effect for (unsigned int i = 0; i < _sharpen; i ++) image->contrast(1); } void Contrast::refreshParameters(Inkscape::Extension::Effect *module) { _sharpen = module->get_param_int("sharpen"); } #include "../clear-n_.h" void Contrast::init() { // clang-format off Inkscape::Extension::build_from_mem( "\n" "" N_("Contrast") "\n" "org.inkscape.effect.bitmap.contrast\n" "0\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Increase or decrease contrast in bitmap(s)") "\n" "\n" "\n", new Contrast()); // clang-format on } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */