A standalone SVG thumbnail and preview plugin for Total Commander. No Inkscape, no ImageMagick, no external dependencies — just drop it in and go.
- Thumbnail view (Ctrl+Shift+F1): See SVG previews right in the file panel
- Quick view (Ctrl+Q): Preview SVGs in the lister panel
- Full lister (F3): Open SVGs in the lister window
- File navigation: Arrow keys to browse between SVG files in lister
- Handles
.svgand.svgzextensions - Lightweight: ~50-80 KB compiled DLL
- Works with both 32-bit and 64-bit Total Commander
- Uses NanoSVG (public domain) for rendering
You need either:
- MinGW-w64 (recommended) — available from mingw-w64.org or via MSYS2
- Visual Studio with C/C++ workload (use Developer Command Prompt)
Download these two files from memononen/nanosvg:
nanosvg.hnanosvgrast.h
Place them in the src\ directory alongside svgthumb.c.
With MinGW-w64:
build.bat
With MSVC:
build_msvc.bat
This produces:
build\svgthumb.wlx(32-bit)build\svgthumb.wlx64(64-bit)
Option A — Automatic:
- Open the
build\directory in Total Commander - Double-click
svgthumb.wlx— TC will offer to install it
Option B — Manual:
- Go to Configuration → Options → Plugins → LS (Lister)
- Click Add and select
svgthumb.wlx(or.wlx64for 64-bit TC) - The detect string
EXT="SVG" | EXT="SVGZ"will be auto-filled
- Switch to thumbnail view: Ctrl+Shift+F1
- Quick preview panel: Ctrl+Q
- Full preview: F3 on any SVG file
The plugin exports the standard Total Commander WLX interface functions:
| Function | Purpose |
|---|---|
ListGetDetectString |
Tells TC we handle .svg and .svgz files |
ListGetPreviewBitmap |
Renders SVG → HBITMAP for thumbnail view |
ListLoad |
Creates preview window for F3/Ctrl+Q |
ListLoadNext |
Handles file navigation in lister |
ListCloseWindow |
Cleanup |
NanoSVG parses the SVG XML into vector paths, then rasterizes them to an RGBA pixel buffer at the requested thumbnail size. The plugin converts this to a Windows DIB Section (HBITMAP) that TC can display.
NanoSVG handles most common SVG features including:
- Basic shapes (rect, circle, ellipse, line, polyline, polygon)
- Paths with cubic bezier curves
- Fill and stroke colors (named colors, hex, rgb)
- Gradients (linear and radial)
- Transforms (translate, rotate, scale, matrix)
- ViewBox and units
- Groups and layering
- Opacity
Not supported (NanoSVG limitations):
- Text elements (rendered as paths if converted)
- Filters (blur, drop-shadow, etc.)
- Animations
- JavaScript / interactivity
- CSS stylesheets (inline styles work)
<use>/<defs>references (partial support)
For most icon/illustration SVGs (like those from OpenClipart, Flaticon, etc.), rendering will be excellent. Complex SVGs with heavy text or CSS may not render perfectly — but you'll still get a recognizable thumbnail.
svgthumb_wlx/
├── src/
│ ├── svgthumb.c # Plugin source code
│ ├── svgthumb.def # DLL exports definition
│ ├── nanosvg.h # ← download from GitHub
│ └── nanosvgrast.h # ← download from GitHub
├── build.bat # MinGW build script
├── build_msvc.bat # MSVC build script
├── pluginst.inf # TC auto-install descriptor
└── README.md # This file
- The plugin uses
__stdcallcalling convention as required by TC's plugin interface - The
.deffile ensures proper export decoration (no name mangling) -Wl,--kill-at(MinGW) strips the@nndecoration from stdcall exports- Thumbnails are rendered as 24-bit DIBs (TC standard)
- SVGs with transparency are alpha-blended against a white background
- The lister window supports resizing and repainting
Plugin code: MIT License NanoSVG: zlib/libpng license (public domain compatible)