From b29eafffd0b92cc7b67e5cd877aad5e98b0f0231 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Aug 2007 17:38:51 +0000 Subject: r16217@tres: ted | 2007-08-10 10:36:27 -0700 ImageMagick effects patch from Chris Brown. Google Summer of Code project. (bzr r3450) --- .../internal/bitmap/adaptiveThreshold.cpp | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/extension/internal/bitmap/adaptiveThreshold.cpp (limited to 'src/extension/internal/bitmap/adaptiveThreshold.cpp') diff --git a/src/extension/internal/bitmap/adaptiveThreshold.cpp b/src/extension/internal/bitmap/adaptiveThreshold.cpp new file mode 100644 index 000000000..5a2db5dc0 --- /dev/null +++ b/src/extension/internal/bitmap/adaptiveThreshold.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2007 Authors: + * Christopher Brown + * Ted Gould + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "extension/effect.h" +#include "extension/system.h" + +#include "adaptiveThreshold.h" + +namespace Inkscape { +namespace Extension { +namespace Internal { +namespace Bitmap { + +void +AdaptiveThreshold::applyEffect(Magick::Image *image) { + image->adaptiveThreshold(_width, _height); +} + +void +AdaptiveThreshold::refreshParameters(Inkscape::Extension::Effect *module) { + _width = module->get_param_int("width"); + _height = module->get_param_int("height"); +} + +#include "../clear-n_.h" + +void +AdaptiveThreshold::init(void) +{ + Inkscape::Extension::build_from_mem( + "\n" + "" N_("Adaptive Threshold") "\n" + "org.inkscape.effect.bitmap.adaptiveThreshold\n" + "5\n" + "1\n" + "\n" + "all\n" + "\n" + "\n" + "\n" + "" N_("Apply Adaptive Threshold Effect") "\n" + "\n" + "\n", new AdaptiveThreshold()); +} + +}; /* namespace Bitmap */ +}; /* namespace Internal */ +}; /* namespace Extension */ +}; /* namespace Inkscape */ -- cgit v1.2.3