[pdftex] kvec (was: Converting images to Beziers)

Michael Chapman pdftex at mchapman.com
Fri Mar 24 05:35:54 CET 2006


On Thursday 23 March 2006 4:52 pm, Martin Schröder wrote:
> On 2006-03-22 08:30:01 +0000, Michael Chapman wrote:

> > My (perhaps primitive) attempts though have only produced more _polygons_
> > and not the Bezier curves I wanted. Suspect what I am dreaming of is
> > going to be
>
> Have you tried the -bezier option?
>
> -bezier:           The output will consist of bezier-curves instead of
>                    straight lines. This allows you to zoom the image
> without getting edges. For the output formats which don't support bezier
> curves, the bezier algorithm will
>                    be simulated and approximated by polylines.

Yes, I did. I was outputting to *.fig (Xfig) which supports Bezier splines. 
But I only got polygons (as I said it may be my naïvety/newness).

For a simple human silhouette that was traced from an artist's drawing and 
then hand fitted by me, I have an Xfig file of 1.4 KB, converting that to PNG 
(8KB) and then back via Kvec I get an enormous (but detailed and exact) 
polygon of some 20 or 30 KB.
(By eye one can get the image down to about 50 spline points.)

There is switch to allow greater 'error' (i.e. simplification) in writing the 
curves (e.g. "kvec -bezier -errbez 20") but it's not on the demo version (and 
I dont seem to be getting curves).

Thanks for all the other suggestions, I will be looking at them.

Inkscape/Potrace seems (?also) to produce polygons rather than Bezier curves 
(that is before they are exported in whatever format). (Indeed my limited 
experience of outputting anything but the most simple shapes to SVG was 
enormous polygon files).

	Michael Chapman


More information about the pdftex mailing list