Howto vectorize a Bitmap-file with the Inkscape 1.0+ cli interface? - inkscape

I want to vectorize a jpg line drawing with the inkscape inbuilt autotrace -centerline option. I found these actions verbs:
--verbs=
FileImport
SelectionTrace
--actions=
select-all
all
so I think this shoud be possible with Inkcape 1.+ cli ui. But how exactly? Thanks!

Related

kustomize overlay editor missing on website

I remember there was an Interactive Tutorial/overlay editor on kustomize.io, but I can't find it anymore. What happend to it? And are there alternatives to generate on overlay file easily?

Video Mixing Options

I am working on a bigger project of video-wall and want to display multiple sources of videos on a single display.
something like this --
What are all my options?
Java with JMF
Python with GStreamer bindings
Before committing to a technology, I want to get a clear picture about available resources and their limitations.
With gstreamer you can realize this. You would use 4 uridecodebin instances and feed them into a videomixer. On each videomixer.pad you can set the xpos,ypos,z-order and alpha. Between the uridecodebins and the videomixer, you probably want to plug scaling and framerate adaptation.

programmatically feed a kml-file and retrieve/generate a .png-file

How can I, programmatically, draw a KML-file (routing information on a map) onto a map and then save the result to a .png-file?
What I try to accomplish: a program of mine (written in C++) produces a route. Now I would like this program to emit a .png-file instead with the route draw on it.
I've looked into the google maps api as well as others (e.g. cartagen) but google maps is java-script oriented and cartagen produces html5 output.
Probably you can use Qt Framework to achive this.
It has great XML support so it should be easy to read KML.
It has support for drawing simple shapes.
It has support for PNGs too.
There is also library called libkml - it can probably help you with manipulating with KML files.
I highly doubt if there is any "Ready to Use" solution.

How to open and display a PDF file using Qt/C++?

I am trying to open and read a PDF file using Qt, but there is no specific way to do that.
I know the subject is a bit old, but...
I found a really simple way to render PDFs in Qt via QtWebKit using pdf.js (http://mozilla.github.com/pdf.js/).
Here is my realization of the idea for Qt5 and the WebEngine: https://github.com/Archie3d/qpdf
Qt itself does not include PDF reading/rendering functionality as far as I know. You might want to have a look at libpoppler which has Qt bindings.
I found this very interesting article on qt-project.org - "Handling PDF - Qt Project".
This page discusses various available options for working with PDF documents in a Qt application. The page does not exactly show how to "open and display an existing PDF document" but it can help you deduce something useful out of all that is explained there.
Here, the page says:
For rendering pages or elements from existing PDF documents to image
files or in-memory pixmaps (useful e.g. for thumbnail generation or
implementing custom viewers), third-party libraries can be used (for
example: poppler-qt4 (freedesktop.org) and muPDF (mupdf.com)).
Alternatively, the task can be delegated to existing command-line
tools (like poppler-utils (freedesktop.org) and muPDF (mupdf.com)).
You can use PdfViewer which is a lightweight PDF viewer that only uses Qt. It contains a PdfView widget which can be easily embedded in your application.
Simple answer : it is not supported in the Qt API.
Other answer : you can code it, I suggest you have a look at this Qt application which uses Ghostscript
The best way I have found to open a pdf is using QProcess in Qt.
You may want to use okular for pdf proccessing.
I know this is an old post, but I stumbled on it during my initial search so I figured I would post some documentation from the solutions I used.
As of Qt 5.10
Check out the QPdfDocument Class. This class can open a PDF and you can use the render function to render a page to an image. I use the QQuickPaintedItem to then "draw" this image but I am sure there are more ways to handle the QImage output.
Prior to Qt 5.10
I used libpoppler to do a VERY similar process.
#include <poppler/qt5/poppler-qt5.h>
Use the Poppler::Document Class to load and handle the entire PDF document and look at the Poppler::Page::renderToImage function to output the page as a QImage.
Qt does not support reading PDF files out of the box and among many approaches you can use Adobe's PDF Reader ActiveX object along with a QAxObject.
You may want to check out this link which describes how to read PDF files in Qt/C++ using ActiveX and has a downloadable example project.

Google Image Charts API - How does it work?

I'm looking to create something loosely similar to the Google Image Charts API, where by I can construct a query string, and an image is returned.
For example:
http://chart.apis.google.com/chart?cht=p3&chs=550x250&chd=t:73,13,10,3,1&chco=80C65A,224499,FF0000&chl=Chocolate|Puff+Pastry|Cookies|Muffffffins|Gelato
I was wondering, what would the best way to achieve this be?
Does anybody have any info on how the Google Image Charts API works "under the hood" ?
Are there any libraries that provide dynamic image generation already?
You can use a server side script to read the query string parameters, generate the image and output the content using the image MIME type.
If you are on PHP, you can use an image library like GD to do this. More information here: http://us3.php.net/manual/en/book.image.php