v0.1.6-pre5
Pre-release
Pre-release
·
6 commits
to main
since this release
InkAnim v0.1.6-pre5 — Drop Shadows, Clipping Masks & 99.5%+ Vector Compliance
Note
Major Rendering Fidelity Milestone: v0.1.6-pre5 brings InkAnim to strict 99.5%+ vector rendering compliance across our 45-fixture integration suite validated against headless Inkscape 1.4. This release introduces support for SVG drop shadow filters (<feGaussianBlur>, <feOffset>), arbitrary clipping paths (<clipPath>), evenodd contour winding normalization, standard miter stroke joins, and a bulk differential scanner (cmd/dev scan).
🎨 Major SVG Vector Rendering Fidelity Overhaul
Our pure-Go in-memory SVG pre-processing and compositing pipeline intercepts and normalizes vector graphics before rasterization, preserving your files on disk without destructive flattening:
- SVG Drop Shadow Filter Compositing: Evaluates SVG drop shadow filter chains (
<filter>,<feGaussianBlur>,<feOffset>,<feFlood>,<feComposite>,<feDropShadow>), synthesizing Gaussian blurred drop shadows composited underneath shapes with 99.98% Inkscape pixel fidelity (#60). - SVG Standard
stroke-linejoin="miter"Defaulting: Injected defaultstroke-linejoin="miter"on stroked shapes per W3C SVG specification, overcoming upstreamoksvgdefaulting tobeveland restoring sharp 90° miter joins across drawings (#64). - SVG
<clipPath>andclip-pathMasking: Implemented dynamic alpha-mask extraction and layered raster compositing for arbitrary clipping paths defined in<defs>and referenced viaclip-path="url(#...)", resolving upstreamrasterx/oksvglack of path clipping and correctly restricting shapes to clipping boundaries (#63). - Vector Subpath Normalization for
fill-rule="evenodd": Evaluated subpath nesting hierarchies and signed polygon area (Shoelace formula) inPreprocessSVGto invert the contour winding of inner cutouts for paths specifyingfill-rule="evenodd", resolving upstreamrasterx/oksvgNonZero limitations and rendering interior cutouts and holes cleanly (#62). - Hidden Element & Group Pruning: Intercepted and pruned non-rendering shapes and container groups with
display="none"orstyle="display:none"duringPreprocessSVGwhile preserving Inkscape animation layers (inkscape:groupmode="layer"), preventing hidden elements, editor guides, and draft artwork from appearing in rendered frames and output GIFs (#61). - Root Viewport Transform Composition on
userSpaceOnUseGradients: Pre-composed the root viewport scaling and translation matrix ontogradientTransformattributes foruserSpaceOnUselinear and radial gradients inRenderSVGToRGBA, fixing severe color shifts, misalignment, and clamped rendering when SVGs are scaled to non-native preview and export dimensions (#58). - Implicit Repeated Arc Command Desugaring: Automatically desugars implicit repeated
aandApath commands into explicit consecutive arcs, completely circumventing upstream multi-arc indexing bugs and restoring missing curves (#57). - Group-Transformed
userSpaceOnUseGradients: Correctly composes ancestor group transforms ontogradientTransform, ensuring gradient fills stay perfectly locked to drawings authored with transformed groups (#56). - Color Gradients & Stop Inheritance: Full multi-level color stop inheritance across
<linearGradient>and<radialGradient>templates referencing shared palettes viaxlink:href/href. Promotes inline CSSstyleproperties (stop-color,stop-opacity) to explicit XML attributes, eliminating solid black gradient fallbacks (#49, #55). - Smooth LPE Fillet & Chamfer Vertices: Seamlessly evaluates Inkscape
fillet_chamferLive Path Effects on closed polygons, rounding all vertices including vertex 0 acrossZsubpaths with non-inverted closing tangent arcs (#41). - Embedded Raster Graphics (
<image>): Decodes and layers embedded base64 PNG, JPEG, and WebP raster images interleaved with vector paths with true z-ordering, affine transforms, and opacity (#47). - Reusable Symbol Clones (
<use>): Inlines and synthesizes<use>clones into transformed<g>groups that inherit downstream stroke scaling and styling (#46). - True Transform Stroke Scaling: Multiplies ancestor group scale factors by shape-level
transformattributes (matrix,scale), keeping outlines at their intended visual weight (#52). - Rect Corner Radius Zero Normalization: Mirrors non-zero corner radii when either
rxorryis zero, ensuring rounded rectangles render correctly (#53). - Physical Unit Conversion: Translates physical length units (
"in","mm","cm","pt","pc") to standard 96 DPI pixels (#45). - Canvas Background Colors: Honors
sodipodi:namedview pagecolorandinkscape:pageopacitycanvas backgrounds (#43). - Aspect-Preserving Letterbox Scaling: Implements SVG
preserveAspectRatio(defaulting toxMidYMid meet) inRenderSVGToRGBAto avoid distortion when rendering into square Twitch emote dimensions (#48). - System Font Fallbacks: Gracefully falls back to system sans-serif fonts (
DejaVu Sans,Segoe UI) for uninstalled font families, maintaining proper text layout (#54).
🧪 Automated Headless Inkscape Golden CI Gate & Dev CLI
- 45-Fixture Golden Integration Suite: Rendered outputs are automatically validated against reference images generated by headless Inkscape 1.4 using perceptual image comparison with strict ≤0.50% vector shape tolerance (#40).
- Bulk Differential Testing Scanner (
cmd/dev scan): Added a dedicatedscansubcommand tocmd/devthat recursively scans directories of SVGs, computes perceptual pixel differences against headless Inkscape ground truth, generates visual diff PNGs with neon magenta highlights on failures, and prints a comprehensive summary table with per-feature breakdown metrics (#59). - Continuous Integration Gate: Runs on every push and pull request via GitHub Actions to prevent visual regressions (#40).
- Developer CLI (
cmd/dev): Added subcommands for canonical golden generation and pixel visual diffs:(#51).go run ./cmd/dev scan testdata/fixtures go run ./cmd/dev golden --generate <fixture> go run ./cmd/dev inspect <image.png>
🎬 Studio UI & Animation Engine
-
"Ping-Pong" (Bounce / Reverse) Loop Playback & GIF Export: Added support for Ping-Pong looping across both the live preview playback engine and the exported GIF encoding pipeline (
$2N-2$ sequence), ensuring seamless bouncing loops in external players like Twitch, Discord, and browsers (#2). - WYSIWYG Palette Quantization & Dithering Preview: Live animation preview canvas and Twitch scale thumbnails reflect the active color palette quantization (2–256 colors) and Floyd-Steinberg dithering in real time (#34).
- Unified Right-Side Tabbed Sidebar: Consolidated Left Frames panel and Right Export panel into a single tabbed sidebar ("Frames" and "Export" tabs) on the right side of the window, freeing up ~240px of horizontal space for a much larger, more immersive animation preview canvas (#35).
- Collapsible Bottom Scale Inspector: Added a "Scale Inspector" checkbox toggle in playback controls to hide/show the bottom Twitch chat-scale preview dock, allowing the main animation canvas to expand to full window height (#35).
- Clean Export & Speed Preset Visibility: Resolution, Dimensions, and Global Speed text inputs are hidden by default and only revealed when choosing "Custom", preventing UI clutter (#33).
- Optimized GIF Color Quantization: Up to 15.6x faster palette generation and quantization via flat pre-unpacked palette entries, scaled integer Euclidean distance math, and an L1 CPU color cache (#26).
-
Zero-Allocation GIF Streaming: Replaced duplicated buffer allocations with a direct
countingWriter(#28).
🌐 Web Studio & WebAssembly Edition
- In-Browser Studio: Access the full-featured WebAssembly studio directly from your browser at mrpoundsign.github.io/InkAnim/demo/.
- Sample Animations Toolbar: Easily test sample multi-layer SVGs (
hydrate.svg,character_walk.svg) with 1-click loading. - Twitch Chat Scale Preview: Real-time 112×112, 56×56, and 28×28 scale inspector and palette quantization preview.
- Zero-Install Workflow: Drop in any layered SVG to preview, adjust playback speeds, and export production-ready animated GIFs instantly.
📦 Downloads & Binaries
| Target | Platform | Archive |
|---|---|---|
| Desktop GUI | Windows (x64) | InkAnim_v0.1.6-pre5_windows_amd64.zip |
| Desktop GUI | Windows (ARM64) | InkAnim_v0.1.6-pre5_windows_arm64.zip |
| Desktop GUI | Linux (x64) | InkAnim_v0.1.6-pre5_linux_amd64.tar.xz |
| Desktop GUI | Linux (ARM64) | InkAnim_v0.1.6-pre5_linux_arm64.tar.xz |
| Headless CLI | Windows (x64) | inkanim-cli_0.1.6-pre5_windows_amd64.zip |
| Headless CLI | Windows (ARM64) | inkanim-cli_0.1.6-pre5_windows_arm64.zip |
| Headless CLI | Linux (x64) | inkanim-cli_0.1.6-pre5_linux_amd64.tar.gz |
| Headless CLI | Linux (ARM64) | inkanim-cli_0.1.6-pre5_linux_arm64.tar.gz |
| All Checksums | SHA-256 | checksums.txt |