BitmapTracer

User Manual · v1.10.5
Version 1.10.5 Windows · Portable Author: Bernhard Lickert Developed with Claude (Anthropic) © 2026

1. About BitmapTracer

BitmapTracer automatically converts raster graphics (bitmaps) into scalable vector graphics. The program detects contours and generates precise vector paths for lossless printing at any size.

Ideal for: logos, stamps, stencils, technical drawings, line art, portrait vectorization with fine grain.
FeatureDetails
Input formatsBMP, PNG, JPG/JPEG, TIFF, GIF, WebP
Output formatsSVG, PDF, DXF, PNG
EnginesOpenCV (built-in) + potrace (external, optional)
Operating systemWindows 10 / 11 (64-bit)
AuthorBernhard Lickert · Developed with Claude (Anthropic)

2. Installation & Launch

1

Unpack the ZIP

Extract bitmap_tracer_v1.10.6.zip into a folder, e. g. C:\Tools\BitmapTracer\.

2

Build the EXE (one time, approx. 3–5 min.)

Double-click build_bitmap_tracer.bat. The script installs all dependencies and creates dist\BitmapTracer_v1.10.6.exe.

3

Start the program

Double-click start_bitmap_tracer.bat – it automatically deletes the __pycache__ folder and starts the EXE or Python directly.

Important for updates: Always use start_bitmap_tracer.bat – it clears the Python cache automatically. Without this step an outdated .pyc file may get loaded.

Contents of the EXE folder (dist\)

After building, the dist\ folder contains the EXE. The following files must be placed beside the EXE:

FileRequiredNotes
BitmapTracer_v1.10.6.exe✓The application
potrace.exerecommendedEmbedded in EXE from v1.10.5 (fallback). A file beside the EXE takes priority and allows updates without rebuilding. Download: potrace.sourceforge.net
bt_profiles.jsonoptionalEmbedded from v1.10.5. Created beside the EXE once profiles are saved (then takes priority over embedded copy).
bt_5_Farben.jsonoptionalEmbedded from v1.10.5. Colour profile supplement.
bt_config.json–Created automatically on first launch (user settings, window size, language).
start_bitmap_tracer.batoptionalLaunches EXE or Python directly, clears cache.
Python mode (without EXE): All files from the ZIP reside in the same folder. Launch via start_bitmap_tracer.bat or python bitmap_tracer.py.

3. Operation

Window layout

AreaFunction
Header / left panelProfile management, engine selection, all parameters
Left columnMode, preprocessing, contrast/levels
Right columnContour, colors, stencil, export & scale
ToolbarOpen image · Re-trace · Zoom 1:1 · Preview quality · Original on/off
File menuOpen · Export · MRU list (last 5 files) · Quit
Left previewOriginal image
Right previewTracing result (live update)
Color palette barBelow the tracing result: color swatches with hex code. Click = on/off, click hex = copy, right-click = change color
Status barEngine, contour counter, threshold · progress bar on the right while tracing

Using the sliders

ActionFunction
DragSet a rough value
Mouse wheelFine ±1 step
Shift + mouse wheelCoarse ±10 steps
Double-click the numberType an exact value directly
Hover over slider / comboTooltip with value range, effect, and ⚠ note
Ctrl+Z / Ctrl+YUndo / Redo (up to 20 steps)

Using the preview

ActionFunction
Mouse wheel on previewZoom towards the cursor position – original and result stay in sync
Left-click + dragMove the image (pan) – grab cursor appears
Middle-click + dragMove the image (alternative pan method)
⊞ Zoom 1:1Reset zoom and pan
Zoom % display (toolbar)Current zoom factor (100% = fit)

4. Color Palette Bar

After a color trace (mode = color, OpenCV engine) a bar appears below the tracing result with one swatch per k-means color layer.

Each swatch shows a color block (with eye symbol ●/○) and next to it the hex code of the color (e. g. #3a2f1c).

ActionEffect
Left-click the color block (●)Show/hide the layer (● = visible, ○ = hidden). Preview updates immediately.
Left-click the hex codeCopy the hex value (e. g. #3a2f1c) to the clipboard. The status bar confirms.
Right-click a swatchOpen the color picker – change this layer's color. Preview updates immediately.
✓ all buttonShow all hidden layers again.
Note: The color palette bar only appears in color mode (OpenCV engine). With mono, canny and potrace it shows "no trace yet".
Usage tip: Copy the hex code of a k-means tone with one click and paste it directly into Inkscape, CSS, or another program – no manual reading required.

5. Zoom & Pan (v1.8.3)

Original and result previews are always synchronized – both show the same section at the same zoom factor.

The mouse wheel zooms towards the cursor position (not the canvas center). Zoom right onto the detail you want to compare – both images remain perfectly aligned.

Tip for detail comparison: zoom to 400–800%, then left-click-drag to position. The original on the left and the tracing result on the right always show exactly the same area.

6. MRU List & Export Path Memory (v1.8.0)

MRU list (Most Recently Used)

The last 5 opened images automatically appear at the end of the File menu. One click opens the image directly – no folder browsing required.

The MRU list is stored in bt_config.json and survives program restarts.

Export path memory

The most recently used export folder is also stored in bt_config.json. On the next export (SVG, PDF, DXF, PNG) the file dialog opens in that folder automatically.

7. Engines

EngineStrengthsWhen to use
OpenCVAlways available, color tracing, Canny edgesLogos, color vectorization, line drawings
potraceSmoothest curves, best grain for photos, Inkscape qualityPortraits, fine grain, stencils from photos
Installing potrace: download potrace.exe from potrace.sourceforge.net and place it next to bitmap_tracer.py, or add it to the PATH. Then restart BitmapTracer.

8. Settings Reference

Mode / parameters (OpenCV)

ModeDescriptionSuitable for
monoBlack/white tracing, single thresholdLogos, stamps, lettering
colork-means color quantization, one layer per colorMulticolor logos, clip art
cannyEdge detection, outlines onlyPhotos → line drawings

Preprocessing

FilterDescriptionTip
noneNo preprocessingFor an Inkscape-like result
ditherFloyd-Steinberg dithering → fine organic grain. Threshold internally always 128.Gamma controls dot density
bayerOrdered dithering, regular raster. Bayer grain controls raster size (power of 2: 2/4/8/16).Geometric grain
halftoneRound raster dots like offset printing. Halftone slider controls dot size.Print look
claheLocal contrast enhancement. CLAHE limit controls strength.Poor lighting, scans
bilateralPreserve edges, reduce noise. Bilateral σ controls strength.Noisy photos
Important: Bayer grain, Halftone and Bilateral σ are each active only with the matching filter. With other filters these sliders have no effect. Hover over a slider for the ⚠ tooltip.

Contrast / Levels

ParameterEffect
Input black / whiteBlack point and white point of the input image
GammaMidtone brightness. < 1 = darken (more grain), 1.0 = neutral, > 1 = brighten (less grain). Mouse wheel = ±0.05, Shift+wheel = ±0.5
Output black / whiteContrast limiting of the output

potrace parameters

ParameterRangeEffect
Threshold0–255Binarization threshold. Inkscape default: 126. Ignored when dithering (internally 128).
Alphamax0.0–1.34Curve smoothing. 0.0 = pure polygons (maximum grain, but staircase edges on diagonals). 0.5 = compromise. 1.0 = smooth curves (Inkscape default). See also the staircase section.
Opttolerance0.0–5.0Path simplification. Inkscape value: 2.632. Higher = smoother, more simplified.

9. Tooltips (v1.8.4)

All settings (sliders, checkboxes, combos, color inputs) have tooltips. Just hover the mouse over an element for 1–2 seconds.

Tooltips explain three things:

Tip: Unsure about a setting? Hover over the slider – the tooltip tells you immediately whether it is relevant for the current filter/mode.

10. Reset Buttons (v1.8.5)

Three reset buttons restore all values of a section to the standard defaults and immediately trigger a new trace:

ButtonResets
Reset levelsInput black/white · gamma · output black/white
Reset preprocessingFilter=none · CLAHE limit=2.0 · Bilateral σ=75 · Bayer grain=8 · Halftone=4 · Gaussian blur=0
Reset contourApprox=smooth · Bézier=✓ · Holes=✓ · Smoothing=0 · Corner angle=70° · Min area=20 · Max area=0

11. Fine Grain Setup

Fine grain means: gray tones are rendered as dot density, like in newspaper or screen printing. The darker a gray tone, the denser the dot pattern.

Method 1: Without dithering (Inkscape style)

Potrace directly on the original image – this is how Inkscape works too.

ParameterValueExplanation
Enginepotrace–
FilternoneNo dithering
Threshold100–130Inkscape uses 126
Alphamax0.0–0.1As angular as possible = more detail
Opttolerance2.0–3.0Same as Inkscape
Min area1–5Trace even tiny dots
Gamma1.0–1.3Darken slightly for more dots

→ The "Inkscape-Korn" profile contains exactly these settings.

Method 2: Floyd-Steinberg dithering

Floyd-Steinberg distributes the quantization error to neighboring pixels and creates an organic, irregular dot pattern. The FS threshold is internally always 128. Gamma controls the dot density:

ProfileGammaDot densityWhen to use
Feinkorn-locker0.7~23% blackBright images, loose grain
Feinkorn-mittel1.0~50% blackNatural gray-tone reproduction – starting point
Feinkorn-dicht1.5~77% blackDark, dense grain
Feinkorn-max2.5~93% blackMaximum grain density
Fine tuning: operate the gamma slider with the mouse wheel – each step is 0.05, Shift+wheel = 0.5. This lets you adjust the grain very precisely.

Profile recommendation for portraits

GoalProfile
Like InkscapeInkscape-Korn
Finer than InkscapeUltra-Fein
Organic grain, natural gray tonesFeinkorn-mittel
Very dense grainFeinkorn-dicht or Feinkorn-max
Stencil from a portraitpotrace Stencil

12. Fixing Staircase Edges on Diagonals

With a low Alphamax (e. g. 0.0–0.05, as in the "Ultra-Fein" profile), potrace draws diagonals as staircase steps – the typical pixel staircase pattern. Cause: Alphamax ≈ 0 produces pure polygons without curve smoothing.

AlphamaxEffect
0.00 – 0.05Pure polygons → maximum grain, but staircases on diagonals
0.5Compromise: grain remains, diagonals get smoothed
1.00Smooth curves (Inkscape default) – no staircases
1.34Maximum smoothing
Quick fix for potrace: raise Alphamax from 0.03 to 0.5–1.0 – the staircases disappear while the grain in the areas largely remains. Optional: enable Gaussian blur 1.

Staircases in color mode (OpenCV color)

Inkscape produces smoother color areas because it internally runs potrace with alphamax=1.0 for every color layer. The recommended solution in BitmapTracer:

Recommendation: load the "Farbe-potrace" profile. It enables color mode in the potrace panel: k-means → for each color mask → potrace → true smooth Bézier curves. Matches the Inkscape scan procedure exactly.
Note: OpenCV contours + smoothing approach Inkscape's quality but do not fully reach it – Inkscape uses potrace internally, which computes true smooth Bézier curves directly from the pixel data.
Quick fix for potrace: raise Alphamax from 0.03 to 0.5–1.0 – staircases disappear, the grain in the areas largely remains. Optional: enable Gaussian blur 1 to smooth pixel boundaries before tracing.

13. Profiles

Profiles store all settings. File: bt_profiles.json next to the EXE.

ActionDescription
LoadSelect a profile from the dropdown → click Load or just pick from the dropdown
SaveStore the current settings under a name
ExportExport as a .json file (share with others)
ImportMenu Profiles → Import
DeleteMenu Profiles → Delete profile

Bundled profiles

When loading a profile, a short description appears in the status bar. All profiles show a tooltip on hover. (Profile names are kept in German – they are identifiers shared between both languages.)

ProfileEngineDescription
StandardOpenCVBalanced settings for general images. OpenCV · mono · threshold 128.
5 FarbenOpenCV5-color tracing with k-means. Good for logos and flat illustrations.
StencilOpenCVStencil-optimized: high contrast, hard edges. Ideal for stencils and cutting plotters.
potrace Fotopotracepotrace engine with CLAHE preprocessing. Best quality for photos with even contrast.
potrace Stencilpotracepotrace + high threshold for hard stencil edges. Bézier curves with maximum smoothing.
Bayer-KornpotraceRegular Bayer raster dithering. Even geometric dot pattern.
HalftonepotraceHalftone print simulation: round dots like offset printing. Dot size adjustable via the halftone slider.
ZeitungsdruckpotraceCoarse halftone raster for a newspaper-print look. High contrast, large dots.
Korn (OpenCV)OpenCVFloyd-Steinberg dithering with OpenCV. Organic, irregular dot grain.
Inkscape-Kornpotracepotrace + Floyd-Steinberg: matches Inkscape's trace bitmap. Fine, natural grain.
Ultra-FeinpotraceMinimal area, many contours. For delicate details in clean line drawings.
Farbe-potracepotracek-means + potrace per color layer (like Inkscape scan). Every color = true Bézier curves. Slower, maximum quality.
Ultra-KornOpenCVExtreme Floyd-Steinberg grain. High contrast + maximum dithering.
BleistiftOpenCVSimulates a pencil drawing: light lines on a light background. Canny edge detection + invert.
Logo hartOpenCVFor logos and vector graphics: hard edges, no blur. High threshold, minimal smoothing.
Aquarell-UmrissOpenCVSoft contours like watercolor sketches. Bilateral filter + curve smoothing.
Siebdruck 3FOpenCV3-color screen-print simulation. k-means with 3 colors, hard edges.
Porträt SchattenpotracePortraits: emphasizes shadow areas. CLAHE + adapted threshold.
KupferstichpotraceCopperplate-engraving look: fine Bayer raster. Small raster size, high contrast.
Druckgrafik lockerpotraceLoose printmaking lines. Medium grain, relaxed contours.
Druckgrafik dichtpotraceDense printmaking: many tight lines. High grain, tight contour approximation.
Hochkontrast-FarbeOpenCVColor tracing with high contrast. Few colors, hard boundaries.
InvertiertOpenCVInverted tracing: bright areas become the foreground. For dark images with bright subjects.

14. Export Formats

SVG

Universal vector format. Opens in Inkscape, Illustrator, CorelDRAW, web browsers. Native Bézier curves, color layers, hole detection (fill-rule nonzero – correct for browsers since v1.7).

PDF

Print-ready, scalable, with metadata and an author footer. Color layers are drawn as separate paths (no FILL_EVEN_ODD bug since v1.8.2).

DXF

CAD format. Y axis mirrored automatically. Bézier curves resolved into polylines. Color layers with truecolor. Compatible with AutoCAD R13+.

PNG

File → Export as PNG saves the tracing result as a raster image at original resolution. Ideal for web, laser-cutter raster engraving, or previews.

PNG for Inkscape

For Inkscape … exports the preprocessed image (after levels/CLAHE/dithering). Open it in Inkscape → Extensions → Trace Bitmap → Brightness cutoff. Combines BitmapTracer's preprocessing with Inkscape's tracing quality.

15. Undo & Redo

BitmapTracer keeps up to 20 settings steps in memory.

ActionShortcutMenu
UndoCtrl+ZEdit → Undo
RedoCtrl+YEdit → Redo
Re-traceF5Toolbar → Re-trace
Cancel a running potrace trace (new in v1.9.18)Esc–
Esc cancel: works on potrace traces (mono and color mode) and in batch export. Pure OpenCV traces run inside native library routines and cannot be interrupted – Esc has no effect there.
The undo stack is cleared when a new image is loaded. It stores settings, not image data.

16. New features v1.9.5 – v1.10.6

v1.10.3 – Language switch stage 3: English manual

The language switch is complete: Handbuch_EN.html – a full English translation of the manual – is now part of the release. With the interface set to English, Help → Open manual (English) opens the English manual (with automatic fallback to the German one if the file is missing). In addition, the manual lookup now also searches the PyInstaller bundle (sys._MEIPASS) – previously the onefile EXE only found the manual if it happened to lie next to the EXE. bump_version.py gained a third invariant: a translation completeness check – every T("…") literal must have an entry in _TR_EN, otherwise the version bump aborts. This permanently prevents new UI texts from shipping untranslated.

v1.10.2 – Language switch stage 2: tooltips, profiles, status messages

The English interface now also covers all texts set at runtime: all ~48 tooltips (incl. the dynamic profile tooltip), all 23 profile descriptions (profile combobox tooltip and short status-bar text on loading a profile), all dynamic status messages (trace status, contour counters left and right, SVG preview, export, undo/redo and error messages, Esc cancel), the engine hint "potrace not found – Help > Set up potrace" and the complete batch export dialog (status, log, message boxes, folder dialog titles). Tooltips are translated when shown – a language switch takes effect there without a restart.

v1.10.0/v1.10.1 – Language switch German/English

Under View → Sprache / Language the interface language can be switched between German and English. The choice is stored in bt_config.json. The menu bar switches immediately; all other elements appear in the new language after a restart. If a translation is missing, the German text is shown automatically – an empty or broken text can never occur.

v1.9.21 – Invariant self-test & release standard

v1.9.20 – Code audit: three regressions fixed

v1.9.19 – BUGFIX: mini preview & PDF/DXF export with potrace

v1.9.18 – Esc cancel & NumPy future-proofing

v1.9.17 – Code review: 8 bugfixes

v1.9.16 – Performance & robustness

v1.9.15 – Code cleanup & stability fixes

v1.9.14 – Bugfixes & consistency

v1.9.13 – Bugfixes & improvements

v1.9.12 – Bugfixes & code quality

v1.9.11 – Features & profile overhaul

ProfileEngine / modeVisual result
BleistiftOpenCV · CannyEdges only, no fill – pencil drawing
Logo hartOpenCV · monoHigh threshold, sharp corners – logos/stamps
Aquarell-UmrissOpenCV · CannyStrong blur + soft lines – painterly
Siebdruck 3FOpenCV · colorOnly 3 colors, bold boundaries
Porträt Schattenpotrace · bilateralOnly shadows remain (brighter gamma)
Kupferstichpotrace · Bayer 4pxGeometric fine raster
Druckgrafik lockerpotrace · no filterGamma 2.8 – loose Inkscape grain
Druckgrafik dichtpotrace · no filterGamma 1.4 – dense Inkscape grain
Hochkontrast-FarbeOpenCV · color 8CBold color blocks
InvertiertOpenCV · monoWhite on black

v1.9.10 – Code review & fixes

v1.9.9 – PDF fix, post-export dialog, zoom shortcuts

PDF fix: FILL_EVEN_ODD → FILL_NON_ZERO in export_pdf. Fixes cut-out color layers in PDF color export (regression since v1.8.2).

v1.9.8 – Full code review

v1.9.7 – SVG preview & contour count

v1.9.6 – Invert bugfix

Important for users of older profiles: profiles with preproc=clahe or bilateral and the potrace engine were permanently inverted before v1.9.6. Threshold values of these profiles may behave differently after the update and should be re-tuned.

v1.9.5 – Shortcuts & quality

17. How Invert Works

Since v1.9.6 there is a single function _thresh_flag(invert, for_potrace) that makes all threshold decisions:

Modeinvert=Falseinvert=True
OpenCV mono/color/cannyBlack = foreground (BINARY_INV)Bright = foreground (BINARY)
potrace (for binarization)Black = foreground (BINARY)Bright = foreground (BINARY_INV)
CannyEdges normalEdges inverted (bitwise_not)
Color modeMasks normalMasks inverted (bitwise_not per mask)
Tip: Invert and Input inv. are different things: Invert acts on the binarization (swap bright/dark). Input inv. corresponds to potrace --invert and acts on potrace's internal processing.

18. Tips & Tricks

Best results

Source image recommendations

SourceProfileBlur
Portrait, Inkscape qualityInkscape-Korn0
Portrait, even finerUltra-Fein (raise Alphamax if needed)0
Portrait, organic grainFeinkorn-mittel0
Logo / stamp (b/w)Standard1–2
Multicolor logo5 Farben1
Stencil from a photopotrace Stencil1
Photo → line drawingpotrace Foto, mode canny1–2

19. System Requirements

ComponentMinimumRecommended
Operating systemWindows 10 64-bitWindows 11 64-bit
RAM512 MB free2 GB free
Resolution1280 × 7201920 × 1080
Python (for the build)3.103.13

Libraries used

LibraryPurposeLicense
OpenCV (cv2)Image processing, contour detectionApache 2.0
Pillow (PIL)Image formats, previewHPND
ReportLabPDF exportBSD
NumPyArray operationsBSD
tkinterGUIPython License
potraceVectorization engine (external)GPL v2

20. Version History

The complete, detailed version history (German) is in Handbuch.html, section 20. Summary of the most important milestones:

VersionKey changes
v1.6 – v1.8.xThumbnail preview system · SVG fill-rule fix · MRU list · export path memory · synchronized zoom/pan · tooltips · color palette bar with hex copy · reset buttons.
v1.9.xInvert unification (_thresh_flag) · SVG browser preview · PDF FILL_NON_ZERO fix · profile overhaul (23 profiles) · keyboard shortcuts · drag & drop · Esc cancel for potrace · potrace coordinate fix · invariant self-test in bump_version.py.
v1.10.0/1Language switch German/English: menus, buttons, dialogs, main window (stage 1).
v1.10.5Transparency bugfix (RGBA PNGs): Cut-out PNGs with transparent background are now handled correctly. Previously: convert('RGB') turned transparent pixels black → a black k-means cluster covered the entire background in the SVG export. Fix: the alpha channel is extracted and used as a mask – transparent pixels (alpha ≤ 127) are excluded from k-means (label = -1) and appear in no colour mask. Dilation is restricted to the opaque area. Result: transparent stays transparent in SVG export, regardless of subject colour. Also: potrace's own <rect fill="#000000"/> is now removed when bg_color=transparent.
v1.10.5EXE improvements: bt_profiles.json, bt_5_Farben.json and potrace.exe are now embedded in the EXE (all 23 curated profiles and the potrace engine are available without separate files; a potrace.exe beside the EXE still takes priority). Icon path in the spec is now resolved via SPECPATH – icon was not found during build despite being present.
v1.10.6EXE build fixes & improvements: Fixed SPECPATH error in spec (dirname(SPECPATH) returned wrong directory → potrace.exe and icons were not embedded). potrace radio button now refreshes after 500 ms automatically. potrace_available() with lazy reload. bt_profiles.json, bt_5_Farben.json and potrace.exe embedded in EXE; build_bitmap_tracer.bat downloads potrace automatically. find_potrace() also searches Python directory.
v1.10.5Build fix: build_bitmap_tracer.bat now installs windnd – drag & drop was missing in the EXE without it.
v1.10.2Language switch stage 2: all tooltips, profile descriptions, dynamic status messages, batch export dialog (+121 translations).
v1.10.3Language switch stage 3: English manual (Handbuch_EN.html), language-aware Help menu entry, manual lookup also in the PyInstaller bundle, third bump invariant (translation completeness T()/_TR_EN).

21. Copyright & Disclaimer

Copyright

BitmapTracer v1.10.6
Author: Bernhard Lickert
Developed with Claude (Anthropic)
Copyright © 2026 Bernhard Lickert. All rights reserved.


Disclaimer

This program is provided without any warranty of any kind. Use is entirely at your own risk. The author accepts no liability whatsoever for direct, indirect, or consequential damages arising from the use of this program.