summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d76a37)
raw | patch | inline | side by side (parent: 0d76a37)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 2 Feb 2009 15:52:05 +0000 (15:52 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 2 Feb 2009 15:52:05 +0000 (15:52 +0000) |
src/extension/internal/bitmap/contrast.cpp | patch | blob | history |
diff --git a/src/extension/internal/bitmap/contrast.cpp b/src/extension/internal/bitmap/contrast.cpp
index b024c851587cca087d2a6851e1555c9487b23e9f..eb69f2eb9df63553a4875125d8c24590b0531d8d 100644 (file)
void
Contrast::applyEffect(Magick::Image *image) {
- image->contrast(_sharpen);
+ // 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
"<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
"<name>" N_("Contrast") "</name>\n"
"<id>org.inkscape.effect.bitmap.contrast</id>\n"
- "<param name=\"sharpen\" gui-text=\"" N_("Sharpen") "\" type=\"int\" min=\"0\" max=\"100\">1</param>\n"
+ "<param name=\"sharpen\" gui-text=\"" N_("Adjust") "\" type=\"int\" min=\"0\" max=\"10\">0</param>\n"
"<effect>\n"
"<object-type>all</object-type>\n"
"<effects-menu>\n"
"<submenu name=\"" N_("Raster") "\" />\n"
"</effects-menu>\n"
- "<menu-tip>" N_("Enhance intensity differences in selected bitmap(s).") "</menu-tip>\n"
+ "<menu-tip>" N_("Increase or decrease contrast in bitmap(s)") "</menu-tip>\n"
"</effect>\n"
"</inkscape-extension>\n", new Contrast());
}