Hello,
I would like to write an extension and I can't find enought documentation.
Here is want I want to do:
- Export a part of the current document in PNG (just as the menu file>bitmap export) in sequence (to cut an image in mozaic)
It's possible to do it with the command line option " --export-area " but using the command line (Popen/os.popen3) is very slow because it launch a subprocess.
My question : is it possible to use the embed bitmap export function from an extension ?
Thanks in advance !
[extension] Bitmap export
- prokoudine
- Posts: 186
- Joined: Sat Jun 09, 2007 4:32 am
- Contact:
Re: [extension] Bitmap export
I'm not quite sure it's possible in 0.48. The next version, however, to the best of my knowledge, will feature D-Bus scripting that exposes a lot of Inkscape's internals, so you would be able to just use regular Inkscape features from scripts.
http://libregraphicsworld.org — news and tutorials on free design software
Re: [extension] Bitmap export
Why don't you use existing tools?carto.metro wrote:- Export a part of the current document in PNG (just as the menu file>bitmap export) in sequence (to cut an image in mozaic)
- batch export with 'File > Export Bitmap…'
- slice (and batch) export with 'File > Export bitmap…'
- external: inkscape-slicer
- external (and in Inkscape 0.49): inkscape-guillotine
- maybe related or reusable: inkscape-animation-extension
- …
No, script-based extensions do not have access to internal functions. You can write a C++ extension (aka plugin) like 'Extensions > Render > Grid…' which afaiu could call internal functions, but in this case you need to recompile Inkscape to test and use your extension.carto.metro wrote:My question : is it possible to use the embed bitmap export function from an extension ?
Re: [extension] Bitmap export
I would like to write an extension and I can't find enought documentation.
The info you've received from prokoudine and ~suv is probably better than anything I can offer. But we've had several requests in these forums recently, for info on writing Inkscape extensions. I've been referring them to the bottom part of this page: http://wiki.inkscape.org/wiki/index.php/Inkscape
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 2
- Joined: Sun Feb 20, 2011 10:17 pm
Re: [extension] Bitmap export
Thanks a lot, this is very interesting, I'll look at the trunk version, do you know if the feature is already available ?... (using the a dev version just for exports is not a big risk !prokoudine wrote:I'm not quite sure it's possible in 0.48. The next version, however, to the best of my knowledge, will feature D-Bus scripting that exposes a lot of Inkscape's internals, so you would be able to just use regular Inkscape features from scripts.

~suv wrote:Why don't you use existing tools?
- batch export with 'File > Export Bitmap…'
- slice (and batch) export with 'File > Export bitmap…'
- external: inkscape-slicer
- external (and in Inkscape 0.49): inkscape-guillotine
- maybe related or reusable: inkscape-animation-extension
- …
batch > require a set of hidden rectangle, fastidious thing, and I want to export with multiple dpi > I'll have to make a set of matrix ? it becomes to be really unusable in my case... (and I want to labelize specifically each slice...). For information : for some images I generate something more than 11000 slices for very high resolution... (using a PNG export and a GIMP scheme script to slice...)
slicer-extension > use a subprocess, so it's slow..
inkscape-guillotine> same a above (maybe much more efficient in 0.49 if it's integrated..)
Ok, but writting in python (or an other script language) is much simpler~suv wrote:No, script-based extensions do not have access to internal functions. You can write a C++ extension (aka plugin) like 'Extensions > Render > Grid…' which afaiu could call internal functions, but in this case you need to recompile Inkscape to test and use your extension.carto.metro wrote:My question : is it possible to use the embed bitmap export function from an extension ?


I was looking for something which doesn't exist.. so it's normal that I can't find anything about ! But I approve all efforts on documentation for extensionsbrynn wrote:[...]we've had several requests in these forums recently, for info on writing Inkscape extensions.
