Potrace Mac Brew
Name
The MiKTeX source code allows you to build a Drag'n'Drop installer for macOS: This HOWTO describes the build procedure. Homebrew is a package manager for macOS which you can use to install development libraries and build tools which are required for building MiKTeX on macOS. $ potrace -svg sample.bmp # sample.svg is created. 要望(ほしいもの) potraceはラスター画像をベクター画像に変換するすばらしいフリーソフトのようだけれど、手描きの曲線を塗りつぶすのではなく太い曲線としてベクター画像に変換してくれるソフトはないものか。.
potrace - transform bitmaps into vector graphics.
Synopsis
Description
potrace is a tool for tracing a bitmap, which means, transforming a bitmap into a smooth, scalable image. The input is a bitmap, which means, apixel-based image composed of the two colors black and white only. The default output is an encapsulated PostScript file (EPS). A typical use is to create EPSfiles 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 thenbe rendered at any resolution.
potrace can read bitmaps in the following formats: PBM, PGM, PPM (collectively known as PNM, see pnm(5)), as well as BMP (Windows and OS/2 bitmapformats). The input image should only use the two colors black and white. If other pixel values appear in the input, they will be converted to black and whiteusing a simple threshold method.
potrace can currently produce the following output formats: EPS, PostScript, PDF, SVG, DXF, GeoJSON, PGM, Gimppath, and XFig. Additional backendsmight be added in the future.
Options
The following options are supported. Dimensions (arguments of type dim) can have optional units, e.g. 6.5in, 15cm, 100pt. The default unit is inches(or centimeters, if this was configured at compile time, see COMPILE TIME CONFIGURATION below). For pixel-based output formats such as PGM, DXF, GeoJSON, andGimppath, the default unit is pixels.
General options:
-h, --helpprint help message and exit.
-v, --version
print version info and exit. This also shows the defaults that were compiled into this version of potrace.
-l, --license
print license info and exit.
Input/output options:
filenameEach file can hold an input image, or multiple concatenated input images. If filename arguments are given, then potrace will by default create oneoutput file for each input filename given. The name of the output file is obtained from the input filename by changing its suffix according to the chosenbackend. If changing the suffix is impossible because the names of the input and output files would be identical, then the output filename is created by addingthe '-out' suffix to the name of the input file. If no filename arguments are given, then potrace acts as a filter, reading from standard input andwriting to standard output. A filename of '-' may be given to specify reading from standard input.
write output to this file. All output is directed to the specified file. If this option is used, then multiple input filenames are only allowed formulti-page backends (see BACKEND TYPES below). In this case, each input file may contain one or more bitmaps, and all the bitmaps from all the input files areprocessed and the output concatenated into a single file. A filename of '-' may be given to specify writing to standard output.
--End of options. Any remaining arguments are interpreted as filenames. This also disables filter mode, even if no filenames are given. This is useful forshell scripts, because potrace -- $FILENAMES will behave correctly even for an empty list of filenames. However, -- with an empty list offilenames is not permitted in conjunction with the -o option, because this would generate a document of zero pages, which none of the backendspermit.
Backend selection:
- -e, --eps, -b eps, --backend eps
EPS backend (default). The output is an encapsulated PostScript file. This is a single-page, variable-sized backend.
- -b pdf, --backend pdf
PDF backend. The output is a file in the Portable Document Format. If the input consists of multiple bitmaps, they are each rendered on a separate page.This is a multi-page, variable-sized, backend.
- -s, --svg, -b svg, --backend svg
SVG backend. The output is a Scalable Vector Graphics (SVG) file. This is a single-page, variable-sized backend.
- -b geojson, --backend geojson
GeoJSON backend. The output is a file in the format used by some applications processing geographical data. In this backend, all Bezier curves areapproximated by 8 straight line segments. This is a single-page, variable-sized, pixel-based backend. The -u option has no effect for thisbackend.
- -b gimppath, --backend gimppath
Gimppath backend. This backend produces output suitable to be imported as a path by the GNU Image Manipulation Program (Gimp) (in the Layers, Channels &Paths dialog, select Paths, then right-click and select Import Path). The output is actually an SVG file. The differences to the SVG backend are: the--opaque option has no effect, the --flat option is always on, and the dimensions are pixel-based. This is a single-page, variable-sized,pixel-based backend.
- For more detailed information on these options, see TECHNICAL DOCUMENTATION below.
- -zpolicy, --turnpolicypolicy
specify how to resolve ambiguities in path decomposition. Must be one of black, white, right, left, minority, majority, or random. Default is minority. Turnpolicies can be abbreviated by an unambigous prefix, e.g., one can specify min instead of minority.
- -an, --alphamaxn
set the corner threshold parameter. The default value is 1. The smaller this value, the more sharp corners will be produced. If this parameter is 0, then nosmoothing will be performed and the output is a polygon. If this parameter is greater than 4/3, then all corners are suppressed and the output is completelysmooth.
- -On, --opttolerancen
set the curve optimization tolerance. The default value is 0.2. Larger values allow more consecutive Bezier curve segments to be joined together in a singlesegment, at the expense of accuracy.
-un, --unitnset output quantization. Coordinates in the output are rounded to 1/unit pixels. The default of 10 usually gives good results. For some of the debug modes,a value of 100 gives more accurate output. This option has no effect for the XFig backend, which always rasterizes to 1/1200 inch, or for the DXF backend. Forthe GeoJSON backend, this option is only a hint; the actual rounding may be more, but not less, accurate than specified.
produce debugging output of type n. This has different effects for different backends. For the PostScript/EPS backends, the values n=1,2,3 illustrate theintermediate stages of the potrace algorithm.
Scaling and placement options:
- -Wdim, --widthdim
set the width of output image (before any rotation and margins). If only one of width and height is specified, the other is adjusted accordingly so that theaspect ratio is preserved.
- -rn[xn], --resolutionn[xn]
for dimension-based backends, set the resolution (in dpi). One inch in the output image corresponds to this many pixels in the input. Note that a largervalue results in a smaller output image. It is possible to specify separate resolutions in the x and y directions by giving an argument of the formnxn. For variable-sized backends, the default resolution is 72dpi. For fixed-size backends, there is no default resolution; the image is bydefault scaled to fit on the page. This option has no effect for pixel-based backends. If -W or -H are specified, they take precedence.
- -Sn, --stretchn
set the aspect ratio. A value greater than 1 means the image will be stretched in the y direction. A value between 0 and 1 means the image will becompressed in the y direction.
- -Mdim, --margindim
set all four margins. The effect and default value of this option depend on the backend. For variable-sized backends, the margins will simply be addedaround the output image (or subtracted, in case of negative margins). The default margin for these backends is 0. For fixed-size backends, the margin settingscan be used to control the placement of the image on the page. If only one of the left and right margin is given, the image will be placed this distance fromthe respective edge of the page, and similarly for top and bottom. If margins are given on opposite sides, the image is scaled to fit between these margins,unless the scaling is already determined explicitly by one or more of the -W, -H, -r, or -x options. By default, fixed-sizebackends use a non-zero margin whose width depends on the page size.
- -Rdim, --rightmargindim
set the right margin. See -M for details.
- -Bdim, --bottommargindim
set the bottom margin. See -M for details.
--tightremove whitespace around the image before scaling and margins are applied. If this option is given, calculations of the width, height, and margins are basedon the actual vector outline, rather than on the outer dimensions of the input pixmap, which is the default. In particular, the --tight option can beused to remove any existing margins from the input image. See the file placement.pdf for a more detailed illustration.
Color options:
- --fillcolor#rrggbb
set the fill color of the output image, i.e., the color of the 'white' parts that are enclosed by 'black' parts. The default is to leave these partstransparent. Implies --opaque. Please note that this option sets the background color; to set the foreground color, use --color instead.
--opaquefill in the white parts of the image opaquely, instead of leaving them transparent. This only applies to interior white parts, i.e., those that are enclosedinside a black outline. Opaqueness is always in effect for the XFig backend.
SVG options:
--groupfor SVG output, try to group related paths together. Each path is grouped together with all paths that are contained inside it, so that they can be movedaround as a unit with an SVG editor. This makes coloring individual components slightly more cumbersome, and thus it is not the default.
--flat
for SVG output, put the entire image into a single path. This makes it impossible to color the components individually, and thus it is not the default. Butthe resulting SVG file can be more easily imported by some applications such as Gimp. In fact, the Gimppath backend is a variation of the SVG backend with the--flat option and pixel-based scaling. The --flat option has no effect if --opaque has been selected.
PostScript/EPS/PDF options:
- Potrace Mac Brew Bar
- -q, --longcoding
- -kn, --blackleveln
- --disable-zlib
- compile potrace without the zlib compression library. This means PostScript level 3 compression will not be available.
- --enable-metric
- compile potrace with centimeters as the default unit instead of inches.
- --enable-a4
- compile potrace with A4 as the default page size.
turn off optimized numerical coding in PostScript output. Normally, potrace uses a very compact numerical format to represent Bezier curves inPostScript, taking advantage of existing redundancy in the curve parameters. This option disables this behavior, resulting in longer, but more readable output(particularly if the -c option is also used).
PGM options:
set the threshold level for converting input images to bitmaps. The potrace algorithm expects a bitmap, thus all pixels of the input images areconverted to black or white before processing begins. Pixels whose brightness is less than n are converted to black, all other pixels to white. Heren is a number between 0 and 1. One case is treated specially: if the input is in an indexed color format with exactly 2 colors, then the blacklevel isignored and the darker of the two colors is mapped to black.
Note: the method used by potrace for converting greymaps to bitmaps is very crude; much better results can be obtained if a separate program, such asmkbitmap(1), is used for this purpose. In particular, mkbitmap(1), which is distributed with potrace, has the ability to scale andinterpolate the image before thresholding, which results in much better preservation of detail.
-i, --invertinvert the input bitmap before processing.
Progress bar options:
--progressdisplay a progress bar for each bitmap that is processed. This is useful for interactive use. The default behavior is not to show any progress information.
--ttymode
set the terminal mode for progress bar rendering. Possible values are 'vt100', which requires a vt100-compatible terminal, and 'dumb', which uses only ASCIIcharacters. The default is system dependent.
Backend Types
Backends can be classified in several ways, which affects the available command line options and their behavior:
Exit Status
The exit status is 0 on successful completion, 1 if the command line was invalid, and 2 on any other error.
Version
1.11
Author
Peter Selinger <selinger at users.sourceforge.net>
Please see the file AUTHORS for a full list of other contributors.
Technical Documentation
For a detailed technical description of the potrace algorithm, see the file potrace.pdf, which is available from the potrace web site. Forinformation on the Potrace library API, see potracelib.pdf.
Web Site And Support
Potrace Mac Brew Company
The latest version of potrace is available from http://potrace.sourceforge.net/. This site also contains a list of frequently asked questions, aswell as information on how to obtain support.
See Also
mkbitmap(1)
Copyright
Copyright © 2001-2013 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 SoftwareFoundation; 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 FITNESSFOR 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 program; if not, write to the Free Software Foundation, Inc., 59 TemplePlace, Suite 330, Boston, MA 02111-1307, USA. See also http://www.gnu.org/.
Potrace Mac Brew Pub
Referenced By
dvisvgm(1)Rishard Khan
rishard.khan@guardian.co.tt
A bodyguard who rescued a couple who were swept away in their vehicle by floodwaters last Thursday, is grateful that he was in the right place at the right time to save them.
The couple Michael Gomes rescued turned out to be longtime People’s National Movement stalwart Ferdie Ferreira, 89, and his wife Pearl, 83.
Last Thursday, heavy rains lead to flooding along the Macqueripe Road in Chaguaramas, leading the river to burst its banks.
At some stage during the flooding, Ferreira and his wife were heading along the roadway in their Toyota Corolla when they got to a point where the road was flooded and attempted to cross in their vehicle. However, the vehicle was swept away by the raging floodwaters.
“I got a phone call that an elderly couple driving a burgundy Toyota Corolla attempted to cross the flooded waters across the Macqueripe main road. They were swept away into the flowing waters,” Gomes told Guardian Media in a voice note recounting the incident yesterday.
“I immediately called the inspector of the CDA (Chaguaramas Development Authority), inspector Dole, informing him of the situation, where he did inform the army, Coast Guard and also an ambulance. I also asked him for a map of that area and where the river runs and leads to.”
Gomes told Guardian Media that he was able to gain access to a telehandler and operator from his boss to assist them in their efforts to rescue the couple. Gomes is the head of security at the UPick Farms.
“After about half an hour of search, almost 200 meters inside the muddy terrain, we found the elderly couple. They were traumatised but okay,” Gomes said.
Gomes and the operator first removed the couple from the vehicle and they were taken to the St James Medical Complex to be examined. Gomes and his team of rescuers then removed the vehicle from where it was lodged in the mud and shrubbery.
“Good thing we were around that we could have saved them,” Gomes said.
A video of the removal of the video was posted on social media last week. At the time, however, the social media users were unaware of the events prior to the removal of the car from the floodwaters and who was involved. The information of those involved in the frightful incident came to light over the weekend.
Efforts to contact Ferreira yesterday were unsuccessful as calls to his cellphone went unanswered.
Potrace Mac Brew Restaurant
This was the second time in recent weeks that persons has been swept away by floodwaters.
Earlier this month, Princes Town resident Anthony Walkes died after he was swept away by floodwaters while crossing a bridge in Hardbargain, Williamsville, as he got trapped in heavy rains while going to see a relative. His body was recovered in the Guaracara River days later.