POTRACE - transform bitmaps into vector graphics
* * *
DESCRIPTION
Potrace is a utility for tracing a bitmap, which means, transforming
a bitmap into a smooth, scalable image. The input is a bitmap (PBM,
PGM, PPM, or BMP), and the default output is one of several vector
file formats. A typical use is to create EPS files from scanned
data, such as company or university logos, handwritten notes, etc.
The resulting image is not "jaggy" like a bitmap, but smooth. It can
then be rendered at any resolution.
Potrace can currently produce the following output formats: EPS,
PostScript, PDF, SVG (scalable vector graphics), DXF, PGM (for easy
antialiasing of pixel-based images), Gimppath, and XFig. Additional
backends might be added in the future.
A separate program, mkbitmap, is also provided. This program can act
as a pre-processor for Potrace, applying scaling and various filters
to an image before converting it to a bitmap. This is useful for
potracing greyscale and color images.
DEPENDENCIES
Potrace relies on the zlib library for PostScript level 3
compression. This library is pre-installed on most modern systems.
If not present, it can be obtained from http://www.gzip.org/zlib/.
COMPILATION
For generic compilation instructions, see the file INSTALL. In
addition, the following compile time options (options to ./configure)
are supported.
--with-libpotrace install Potrace library and headers (default: no)
--disable-zlib disable PostScript level 3 compression
--enable-metric use metric units (centimeters) as default
--enable-a4 use a4 as the default papersize
--enable-dumb-tty use simplified ASCII-only progress bar
See also ./configure --help.
INSTALLING
If you are installing from sources, just do "make install" as root.
If you are installing from a binary distribution, just copy the
"potrace" and "mkbitmap" binaries to a place where the operating
system expects them, such as /usr/local/bin. Also copy the files
"potrace.1" and "mkbitmap.1" to a directory where the operating
system looks for man pages, such as /usr/local/man/man1. For
instructions on installing Potrace under Windows, see the file
README-WIN
USAGE
For more detailed usage information, see the man page.
Usage: potrace [options] [filename...]
-----
rem -c, --cleartext - do not compress the output
rem -o, --output <filename> - write all output to this file
rem -q, --longcoding - do not optimize for file size
rem -n, --longcurve - turn off curve optimization
-----
General options:
-h, --help - print this help message and exit
-v, --version - print version info and exit
-l, --license - print license info and exit
File selection:
<filename> - an input file
-o, --output <filename> - write all output to this file
-- - end of options; 0 or more input filenames follow
Backend selection:
-b, --backend <name> - select backend by name
-e, --eps - EPS backend (encapsulated PostScript) (default)
-p, --postscript - PostScript backend
-s, --svg - SVG backend (scalable vector graphics)
-g, --pgm - PGM backend (portable greymap)
-b pdf - PDF backend (portable document format)
-b pdfpage - fixed page-size PDF backend
-b dxf - DXF backend (drawing interchange format)
-b gimppath - Gimppath backend (GNU Gimp)
-b xfig - XFig backend
Algorithm options:
-z, --turnpolicy <policy> - how to resolve ambiguities in path decomposition
-t, --turdsize <n> - suppress speckles of up to this size (default 2)
-a, --alphamax <n> - corner threshold parameter (default 1)
-n, --longcurve - turn off curve optimization
-O, --opttolerance <n> - curve optimization tolerance (default 0.2)
-u, --unit <n> - quantize output to 1/unit pixels (default 10)
-d, --debug <n> - produce debugging output of type n (n=1,2,3)
Scaling and placement options:
-P, --pagesize <format> - page size (default is letter)
-W, --width <dim> - width of output image
-H, --height <dim> - height of output image
-r, --resolution <n>[x<n>] - resolution (in dpi)
-x, --scale <n>[x<n>] - scaling factor (pixel-based backends)
-S, --stretch <n> - yresolution/xresolution
-A, --rotate <angle> - rotate counterclockwise by angle
-M, --margin <dim> - margin
-L, --leftmargin <dim> - left margin
-R, --rightmargin <dim> - right margin
-T, --topmargin <dim> - top margin
-B, --bottommargin <dim> - bottom margin
--tight - remove whitespace around the input image
Color options, supported by some backends:
-C, --color #rrggbb - set line color (default black)
--fillcolor #rrggbb - set fill color (default transparent)
--opaque - make white shapes opaque
SVG options:
--group - group related paths together
--flat - whole image as a single path
Postscript/EPS/PDF options:
-c, --cleartext - do not compress the output
-2, --level2 - use postscript level 2 compression (default)
-3, --level3 - use postscript level 3 compression
-q, --longcoding - do not optimize for file size
PGM options:
-G, --gamma <n> - gamma value for anti-aliasing (default 2.2)
Frontend options:
-k, --blacklevel <n> - black/white cutoff in input file (default 0.5)
-i, --invert - invert bitmap
Progress bar options:
--progress - show progress bar
--tty <mode> - progress bar rendering: vt100 or dumb
Dimensions can have optional units, e.g. 6.5in, 15cm, 100pt.
Default is inches (or pixels for pgm, dxf, and gimppath backends).
Possible input file formats are: pnm (pbm, pgm, ppm), bmp.
Backends are: eps, postscript, ps, pdf, pdfpage, svg, dxf, pgm, gimppath,
xfig.
POTRACE LIBRARY (FOR DEVELOPERS)
As of Potrace release 1.6, the Potrace core functionality has been
separated into a library libpotrace.a. This makes it easy to integrate
tracing functionality into other GPL programs. The API of the library
is defined in the header file potracelib.h, and is documented in
doc/potracelib.pdf. It is not by default installed, but can be
installed with the --with-libpotrace configuration option.
DOCUMENTATION
Usage information is contained in the man page:
http://potrace.sourceforge.net/potrace.html
Many common questions are answered in the FAQ:
http://potrace.sourceforge.net/faq.html
Some examples are given on the following web pages:
http://potrace.sourceforge.net/samples.html
http://potrace.sourceforge.net/mkbitmap.html
The inner workings of the potrace algorithm are explained here:
http://potrace.sourceforge.net/potrace.pdf
The potrace library is documented here:
http://potrace.sourceforge.net/potracelib.pdf
COPYRIGHT
Copyright (C) 2001-2011 Peter Selinger
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this pro
ap359ap359
- 粉丝: 0
- 资源: 1
最新资源
- Python区块仿真链,适合毕业设计项目或课题研究 汇智网提供.zip
- Python中国知网(cnki)爬虫及数据可视化分析设计毕业源码案例设计.zip
- C++《基于TLD算法和GOTURN算法的多摄像头目标跟踪》+源码+文档说明(高分作品)
- ## 5G模组采用USB3.0与上位机连接,usb接口在上位机上虚拟出多个port,其中一个可用于发送AT命令,控制模组 ## 本脚本控制模组进入飞行模式
- 番茄植物监测58-YOLOv8数据集合集.rar
- 大二上.wakeup_schedule..bin
- Pythonic Redis 客户端.zip
- 橙子投屏apk电视盒子好用版本
- 机器学习集成模型之Stacking各类模型(Bagging、Boosting和Stacking)及工具源码
- 5G模组采用USB3.0与上位机连接,usb接口在上位机上虚拟出多个port,其中一个可用于发送AT命令,控制模组 本脚本可给串口发送指定 的at命令
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈