Changelog
Changes to SVGImage are recorded here, newest first. Dates use the project's local calendar (Europe/Berlin).
Unreleased
These entries describe the current repository source. They have not been assigned a NuGet release version. Install a published package for its released feature set, or build the current source to use these additions.
2026-11-03
Performance
Cold progressive rendering: extract byte decoding, color conversion and encoding into named kernels and compile seven profiled numeric kernels with first-call optimization on the current .NET 6/7/8 targets. Other code retains normal tiered optimization; older targets retain their usual JIT behavior. Geometry-only SVGs defer the thread-safe font catalog until a typeface is actually requested. CSS values without
!skip the importance regex.Add a fresh-process car benchmark with parse/preview/filter/freeze phases, parent process-to-ready timing, alternating baseline/candidate trial order and full preview/image/native-bitmap hashes. Five paired .NET 8 trials against
06c5cca: full pipeline 2.18 s → 1.52 s; process launch to full readiness 2.30 s → 1.63 s. Preview readiness was 262 → 289 ms. All previews, native-size complete images and 70 filter bitmaps match exactly.Record the startup tradeoff in the performance guide: warmed timings varied, and the recorded warmed redraw was 1.07 s → 1.21 s. Add regression checks that geometry-only rendering leaves the font catalog uninitialized and first real text still resolves/renders its typeface correctly.
Further car optimization: process blur columns through tiled transposition and contiguous row kernels; retain identical sliding-sum order, box radii, edge handling and sampling resolution. Black/white/grayscale inputs skip duplicate channel arithmetic. Large numeric buffers use at most four-way parallelism; WPF objects stay on the calling STA and small buffers stay serial.
Fuse native pixel decoding with the initial color conversion for sole SourceGraphic Gaussian filters, and let those filters donate their temporary input as scratch. Multi-primitive/shared-input graphs retain immutable inputs. Fuse final sRGB conversion and byte encoding while preserving intermediate float rounding, removing another full float-frame allocation.
Same-host .NET 8 five-run medians against
dd6ade6: car load 5.07 s → 1.12 s; redraw 5.16 s → 0.94 s. Caller-thread managed allocation fell from 1.38 GB to 643 MB for load. The 900×600 car output and all 70 native filter bitmaps match exactly, as do all twelve benchmark workloads. Raw results and methodology are recorded in the performance guide; timings are machine/workload specific.Add independent direct-convolution tests for black, white, gray and color inputs, all three edge modes, narrow/non-square and parallel-sized images, input donation/isolation and exact fused output rounding. Extend the benchmark with 900×600 and per-bitmap hashes and an optional
carworkload selector.Remove per-pixel color-matrix/blend allocations; avoid repeated empty paint-ancestor traversal; reuse two private blur scratch buffers; materialize alpha inputs on demand; skip unused input conversions, discarded output frames and redundant full-region clipping. Preserve default sampling quality and shared filter inputs.
Same-host .NET 8 measurements (five-iteration medians): car load 5.82 s → 4.69 s and cumulative managed allocation 3.11 GB → 1.38 GB; color-matrix allocations 169 MB → 38 MB; hue-blend allocations 530 MB → 54 MB. All twelve output pixel hashes match the baseline. Results are workload/machine specific; raw data and methodology are recorded in the performance guide.
Add a reproducible .NET 8 STA benchmark for twelve synthetic/real workloads with elapsed time, managed allocation and pixel hashes, plus a performance guide. Add deep-inheritance and shared-blur-input regressions.
Fixed
- #123: setting
stroke-widthor other stroke properties without a stroke paint no longer introduces a black outline. The initial paint remainsnone. Stroke paint, width, opacity, dash array, caps and joins inherit independently, including throughuseinstances; explicitnone/dash resets remain local. Added the issue's exact rectangle and focused inheritance/pixel regressions.
2026-10-29
Added
Lighting filters: diffuse and specular shading from alpha height maps, distant/point/spot lights, Sobel edge/corner normals, lighting color/CSS, surface scale, kernel spacing, spot cones and specular exponents. Diffuse alpha is opaque; specular alpha follows the largest output channel, with clamping before byte conversion.
Filter image inputs:
feImageloads local SVG elements, raster/SVG data URIs and host-resolved external resources; aspect-ratio placement, primitive regions, nested relative SVG resources and cycle guards are supported. Raster image decoding now releases its streams and accepts SVG2hrefand namespace-qualified XLink references.Backdrops:
BackgroundImage/BackgroundAlphacapture preceding siblings insideenable-background:new, with region clipping, nested resets and transformed coordinate spaces. Ancestor group opacity is applied once after composition. Normal documents avoid background capture work.Filter examples: an offline Filter features tab demonstrates lighting, three image-input forms and backdrop glass, with inspectable source.
SVGRender.RasterizationScalecontrols filter sampling (default four pixels per user unit, retaining the 2048-pixel cap).Filter verification: 98 additional resvg lighting/image/background fixtures, plus analytic pixel tests for saturation, alpha, relative resources, recursion, buffer resets and sibling order. Of 321 selected corpus checks, 312 compare reference pixels and nine are render-only; five newly included historical/UB references are covered by explicit current-rule tests where applicable.
Path morphing: native SMIL
dinterpolation for compatible line/quadratic/cubic/arc path structures, to-only underlying paths, clipping/masking integration and discrete switching for incompatible topology.Syncbase timing: forward animation-ID begin/end references, signed offsets, acyclic timing chains, repeated active durations, click-start propagation/history and seeded self-repeating sequences. Unseeded cycles stay inactive; the full SMIL end/restart and multi-animation cycle model remains incomplete.
Animated masks: retained vector clocks for alpha/white masks and live composited luminance masks with correct black-over-white occlusion; bounded 30 Hz/512-pixel raster updates and immediate exact seeking.
CSS transforms: percentage translations using viewport/fill-box bounds; general 2D matrix interpolation through signed scales, rotation and residual skew, preserving compatible prefixes and full rotations. Singular endpoints switch discretely; explicit transform edits made through the rendering API are preserved.
Original animation examples: a dedicated Animation features tab with five offline SVG demos, source inspection, restart and exact-frame controls.
Progressive SVG preview:
SVGRender.UseFilterscan bypass SVG filters while keeping clipping, masks and opacity. The car sample publishes a frozen preview immediately, then rerenders the same parsed SVG with filters on its background STA and replaces the preview with the complete result.Documentation: redesigned homepage and repository overview, original WPF-rendered gallery, support reference, getting-started guide and this permanent changelog.
SVG filter graphs: standalone raster rendering, named
in/in2/resultconnections,SourceGraphic/SourceAlpha, filter regions, primitive subregions, coordinate units and sRGB / linearRGB processing.Procedural effects: four-channel seeded
feTurbulencewith turbulence/fractal noise, one/two base frequencies, octaves and stitching;feDisplacementMapwith unpremultiplied channel selection and bilinear sampling.Convolution and shadows:
feConvolveMatrixkernels, order/targets, divisor/bias, edge modes, kernel spacing and preserved alpha;feDropShadowblur/offset/color/opacity and source-over composition. Added eleven portable convolution and all eight drop-shadow reference comparisons.Animation gallery: a dedicated, lazily created Flash2Svg sample tab lists all 13 wiki examples, credits the original page/project license, caches downloads outside the repository and provides Play/restart for SMIL click triggers. JavaScript/audio remain unsupported.
Release automation: publishing a GitHub release packs all nine frameworks with the release tag's semantic version, validates manifests/assembly versions/symbols, attaches
.nupkg/.snupkgassets and publishes them to NuGet. Push/PR/AppVeyor builds no longer publish packages; GitVersion was removed.More filter primitives:
feFlood,feOffset,feMerge,feComposite,feColorMatrix(matrix, saturation, hue rotation, luminance-to-alpha),feComponentTransfer(identity, table, discrete, linear, gamma),feBlend,feGaussianBlur,feMorphologyandfeTile.Text on a path: local
textPathreferences, glyph placement and tangent rotation, percentagestartOffset, text anchoring and styled spans.SMIL motion:
animateMotionwith inline paths or localmpathreferences, automatic/numeric rotation andkeyPoints/keyTimes.Nested SVG viewports: independent percentage contexts, placement and sizing, viewBox mapping, meet/slice/none and overflow clipping. Symbol viewBoxes establish their content's percentage context too.
Pattern painting: independent tile/content units, tile positions/dimensions, viewBoxes, transforms, opacity and forward
hreftemplates. Patterns are generated per target bounds.CSS cascade: specificity/source order, presentation/inline declarations,
!important, CSS-wide keywords, inherited custom properties, nestedvar()fallbacks and cycle handling.CSS selectors: type, universal, ID, class, compound and attribute presence/equality selectors,
:root, descendant/child and adjacent/general sibling relationships.CSS animation controls: multiple animations, shorthand/longhands, positive/negative delays, fractional repeats, directions, fill modes, initial paused state, grouped offsets and per-keyframe easing. Matching transform functions preserve full rotations.
CSS colors: RGB/RGBA and HSL/HSLA functions, percentage channels, short/long RGBA hex colors, grey aliases and
rebeccapurple.Regression coverage: an optional local resvg test-suite runner for 313 path/point/filter cases and eight turbulence references. Downloaded fixtures remain outside the repository.
Fixed
Background-buffer discovery and root filter composition safely handle an uninitialized SVG document; empty drawings remain valid with filters enabled or disabled.
The Acid1 sample's right pupil now uses modern
rgb(-5% 128 0%)and renders green. RGB/RGBA parsing distinguishes space/slash syntax (mixed numeric/percentage channels allowed) from legacy commas (uniform channel units), accepts multiline CSS whitespace and rejects mixed separators or alpha without a slash. Pixel regressions cover the actual embedded sample and mixed channels/alpha.Animated clip geometry retains its native clocks through unions/transforms and bounding-box mapping. The original
clipping_css.svgnow moves/repeats correctly;repeatDursupports indefinite and finite durations, including frozen partial iterations.Initial control loading publishes its brush palette without rendering the SVG twice. File sources retain their filename for relative resource resolution; embedded SVGs load companion CSS/images beside their resource URI. Initial and later paint overrides remain functional.
Blur passes process RGBA scanlines together, avoiding repeated edge-mode decoding and strided per-channel reads. The sample opens immediately while its detailed static illustration renders on a background STA; only a frozen drawing crosses back to the UI. Sample asset paths resolve relative to the executable regardless of the working directory.
Explicit inherited fill/stroke follow
<use>instance ancestry, fixing the black outer eye inacid1.svg. SVG switch feature lists recognize whitespace-separated required features and reject unsupported extensions independently.Middle/end text anchoring now shifts text before its anchor using advances;
textPathrespects its own anchor style. The native documentation gallery exposed this existing alignment issue.Clip paths unite child silhouettes and honor paths, basic shapes, text,
use, inheritedclip-rule, transforms, bounding-box units and forward references. Empty clips safely hide their targets.Recursive
usereferences stop instead of overflowing the stack. Rendering restores the referenced shape's original parent.Paths preserve completed segments before invalid data, accept adjacent single-token arc flags and reflect curve controls. Point lists preserve valid pairs, ignore unmatched final coordinates and safely handle missing data.
Element opacity is applied after filtering; fill/stroke opacity remains part of
SourceGraphic. User-space generators can paint empty groups; tiling preserves input subregions and their transparent pixels.Radial focal points use the center's coordinate space. Gradient/pattern opacity is independent per use. Gradient spreading and monotonically clamped stop offsets are honored.
RGB alpha/channel clamping, quoted local paint/filter references and explicit inheritance of non-inherited CSS properties are handled correctly.
currentColor, gradient-stop styling, transform origin, variables and animation declarations participate in improved CSS handling.
Verification and scope
- All nine library targets build without warnings/errors. WPF regressions, live clocks and 14 external animation examples pass.
- Selected checks use resvg-test-suite revision
d8e0643: 312 reference-image comparisons and nine render-only cases with historical/nonportable/undefined expectations. Tolerances account for WPF antialiasing, tiled edges and fractional morphology radii. - Blur uses separable box convolutions; morphology uses sliding extrema. Raster filters are capped at 2048 pixels on their longest dimension and sample sources at load time. Single matrix/saturation filters can retain vector paints to preserve native clocks.
- A plain-WPF rendering preflight reports an unavailable Windows graphics session before SVG pixel checks run.
Implementation: CSS, geometry, patterns, motion and procedural filters, filter graphs, paths and colors.
2026-10-28
Added
- Native animation: WPF clocks for SMIL transforms, timed visibility/display, opacity, circle/ellipse radii/centers and root viewBox cameras. Numeric starts, repeats, freeze, key times, splines and explicit click starts are supported.
- CSS keyframes: transform/opacity and stepped sprite-sheet playback, including the extracted CodePen horse example.
- Host controls:
UseAnimations, deterministicSeekAnimationssnapshots andTriggerAnimationEvent. Changing the source after initialization respects the animation setting.
Fixed
- Symbol/use viewBoxes, dimensions, alignment and aspect ratios now render correctly, fixing facial-part placement in MattHead and PeteyHead.
- Static color-matrix/saturation paint mappings support Flash2Svg exports while preserving native drawing animation.
Implementation: native animation.
5.2.16 — 2026-10-28
Added
- Luminance/alpha masks, mask/content units, region clipping, percentages, transforms, styled/forward references, nesting and safe empty/cyclic references. White/alpha masks keep vector drawing where possible; colored luminance masks use composited raster conversion.
Fixed
- The SVG from #118 renders with its intended mask. Its fixture checks 93,767 flat interior pixels against Chromium.
Implementation: SVG masks.
5.2.15 — 2026-10-28
Added
IsGrayscaleandDrawingColorConverter.ToGrayscalecover solid/gradient brushes, strokes, groups and bitmaps. Frozen drawings remain shareable. Addresses #99.
Fixed
- RGB/percentage RGB gradient stops are parsed correctly. Addresses #116.
- SVG button content has an intrinsic desired size without explicit dimensions. Addresses #106.
Implementation: RGB gradients, button sizing, grayscale.
5.2.14 — 2026-10-28
- Incorporated the upstream duplicate-font-name correction from #121, originally authored in March 2026.
Earlier history
For earlier changes, see the release tags and commit history. Historical versions are not reconstructed as release notes here.
Maintaining this changelog
Add user-visible changes under Unreleased, with a dated subsection and issue/commit links. Describe resulting behavior, compatibility changes and practical limits. On package publication, move entries to a versioned release heading with its date and start a fresh Unreleased section. This file is the single source; the documentation site includes it directly.