1 /*
2 * Copyright (C) 2007 Authors:
3 * Christopher Brown <audiere@gmail.com>
4 * Ted Gould <ted@gould.cx>
5 *
6 * Released under GNU GPL, read the file 'COPYING' for more information
7 */
9 #include "extension/effect.h"
10 #include "extension/system.h"
12 #include "contrast.h"
14 namespace Inkscape {
15 namespace Extension {
16 namespace Internal {
17 namespace Bitmap {
19 void
20 Contrast::applyEffect(Magick::Image *image) {
21 printf("(o0x) Sharpening at: %i\n", _sharpen);
22 image->contrast(_sharpen);
23 }
25 void
26 Contrast::refreshParameters(Inkscape::Extension::Effect *module) {
27 _sharpen = module->get_param_bool("sharpen");
28 }
30 #include "../clear-n_.h"
32 void
33 Contrast::init(void)
34 {
35 Inkscape::Extension::build_from_mem(
36 "<inkscape-extension>\n"
37 "<name>" N_("Contrast") "</name>\n"
38 "<id>org.inkscape.effect.bitmap.contrast</id>\n"
39 "<param name=\"sharpen\" gui-text=\"" N_("Sharpen") "\" type=\"boolean\" >1</param>\n"
40 "<effect>\n"
41 "<object-type>all</object-type>\n"
42 "<effects-menu>\n"
43 "<submenu name=\"" N_("Raster") "\" />\n"
44 "</effects-menu>\n"
45 "<menu-tip>" N_("Apply Contrast Effect") "</menu-tip>\n"
46 "</effect>\n"
47 "</inkscape-extension>\n", new Contrast());
48 }
50 }; /* namespace Bitmap */
51 }; /* namespace Internal */
52 }; /* namespace Extension */
53 }; /* namespace Inkscape */