3
* Christopher Brown <audiere@gmail.com>
4
* Ted Gould <ted@gould.cx>
6
* Copyright (C) 2007 Authors
8
* Released under GNU GPL, read the file 'COPYING' for more information
11
#include "extension/effect.h"
12
#include "extension/system.h"
26
Colorize::applyEffect(Magick::Image *image) {
27
float r = ((_color >> 24) & 0xff) / 255.0F;
28
float g = ((_color >> 16) & 0xff) / 255.0F;
29
float b = ((_color >> 8) & 0xff) / 255.0F;
30
float a = ((_color ) & 0xff) / 255.0F;
32
Magick::ColorRGB mc(r,g,b);
34
image->colorize(a * 100, mc);
38
Colorize::refreshParameters(Inkscape::Extension::Effect *module) {
39
_color = module->get_param_color("color");
42
#include "../clear-n_.h"
47
Inkscape::Extension::build_from_mem(
48
"<inkscape-extension>\n"
49
"<name>" N_("Colorize") "</name>\n"
50
"<id>org.inkscape.effect.bitmap.colorize</id>\n"
51
"<param name=\"color\" gui-text=\"" N_("Color") "\" type=\"color\">0</param>\n"
53
"<object-type>all</object-type>\n"
55
"<submenu name=\"" N_("Raster") "\" />\n"
57
"<menu-tip>" N_("Colorize selected bitmap(s) with specified color, using given opacity.") "</menu-tip>\n"
59
"</inkscape-extension>\n", new Colorize());
62
}; /* namespace Bitmap */
63
}; /* namespace Internal */
64
}; /* namespace Extension */
65
}; /* namespace Inkscape */