// 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 "solarize.h" #include namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void Solarize::applyEffect(Magick::Image* image) { // Image Magick Quantum depth = 16 // 655.35 = (2^16 - 1) / 100 image->solarize(_factor * 655.35); } void Solarize::refreshParameters(Inkscape::Extension::Effect* module) { _factor = module->get_param_float("factor"); } #include "../clear-n_.h" void Solarize::init() { // clang-format off Inkscape::Extension::build_from_mem( "\n" "" N_("Solarize") "\n" "org.inkscape.effect.bitmap.solarize\n" "50\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Solarize selected bitmap(s), like overexposing photographic film") "\n" "\n" "\n", new Solarize()); // clang-format on } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */