
Here's the real reason why I implemented "create bitmap copy":
Via prefs, you can specify an external filter that will be run on the PNG file after it is exported but before it is imported back. I use this for grayscaling and blurring the image to create a soft drop shadow for any object.
The script itself is share/extensions/inkscape-shadow.sh. It's not integrated into the extensions or plugin system in any way (Ted, I may need your help on this). The script requires Imagemagick 6.x to be installed.
To enable this, you set in your preferences.xml:
<group id="createbitmap" minsize="250" filter="/full/path/to/inkscape-shadow.sh" filter_param1="20" />
In filter=, you specify either the full path to the script, or just "inkscape-shadow.sh" if the script is in your PATH. The script receives the image filename as the first parameter and the filter_param1 as the second parameter (more parameters can be added). This particular script interprets that as the blur radius in pixels, but of course that depends on the script you use.
Now, I'm not going to provide a GUI for the blurred shadows feature, for these reasons:
1. You have to carry around the shadow PNGs along your SVG. It's inconvenient, and the PNGs may be much larger than the SVG.
2. The shadows are not resolution-independent and are not updated automatically. For all this, we need to support the gaussian blur SVG filter (a standard SVG feature). But since we don't have any filter support yet, hence this hack.
3. Both Batik and Adobe have (different) problems with displaying PNGs with alpha transparency. (Much like the Internet Exploder - shame on them! :)
Still, for those who desperately need blurred shadows right now (such as myself), this feature works well enough. Try it out, it's fun.
participants (1)
-
bulia byak