ShockwaveFlash.Rendering
1.6.0
See the version list below for details.
dotnet add package ShockwaveFlash.Rendering --version 1.6.0
NuGet\Install-Package ShockwaveFlash.Rendering -Version 1.6.0
<PackageReference Include="ShockwaveFlash.Rendering" Version="1.6.0" />
<PackageVersion Include="ShockwaveFlash.Rendering" Version="1.6.0" />
<PackageReference Include="ShockwaveFlash.Rendering" />
paket add ShockwaveFlash.Rendering --version 1.6.0
#r "nuget: ShockwaveFlash.Rendering, 1.6.0"
#:package ShockwaveFlash.Rendering@1.6.0
#addin nuget:?package=ShockwaveFlash.Rendering&version=1.6.0
#tool nuget:?package=ShockwaveFlash.Rendering&version=1.6.0
ShockwaveFlash.Rendering
Render SWF characters — shapes, sprites, timelines, morph shapes, text and images — parsed by ShockwaveFlash to SVG and to raster images (PNG / JPEG / WebP / animated GIF / PDF) through a native, cross-platform Skia backend. No external tools — no Inkscape, rsvg or ImageMagick.
Install
dotnet add package ShockwaveFlash.Rendering
On headless Linux, also add
SkiaSharp.NativeAssets.Linux.NoDependencies.
Render to an image
using ShockwaveFlash;
using ShockwaveFlash.Rendering;
using ShockwaveFlash.Rendering.Drawing.Skia;
var swf = ShockwaveFlashFile.Disassemble(File.ReadAllBytes("movie.swf"));
var renderer = new SwfRenderer(swf);
// the whole movie, scaled 2x...
byte[] png = SkiaDrawer.RenderToPng(renderer.Movie(), scale: 2f);
File.WriteAllBytes("movie.png", png);
// ...or a single character by id
byte[] jpeg = SkiaDrawer.RenderToJpeg(renderer.Character(42), quality: 90);
SkiaDrawer also exposes RenderToWebp, RenderToPdf and RenderToAnimatedGif (which walks every frame of the timeline).
Render to SVG
using ShockwaveFlash.Rendering.Drawing.Svg;
string svg = SvgDrawer.RenderToSvg(renderer.Movie());
File.WriteAllText("movie.svg", svg);
Design
A clean layering, inspired by Arakne-Swf but with rasterization pulled in-process via Skia:
ShockwaveFlash parser / writer
└─ ShockwaveFlash.Rendering
├─ Model/ immutable drawable data (shapes, images, morphs, …)
├─ Processing/ tags → model (ShapeProcessor, TimelineProcessor, …)
├─ Scene/ display list (frames, blend modes)
└─ Drawing/ IDrawer visitor + Skia & SVG backends
- Skia is the native rasterizer — exact gradients, blend modes, filters and anti-aliasing, cross-platform, no shelling out.
IDraweris a streaming visitor — a drawable pushes primitives; a backend turns them into pixels or SVG. One model, multiple outputs.- Immutable model over
ReadOnlyMemory<byte>; coordinates stay in twips until the backend converts to pixels. - Tunable error policy via
RenderOptions—Strictto fail fast, or anIDiagnosticSinkto collect and keep going.
Notes
- Coverage — shapes, sprites, timelines, morph shapes, buttons, static and edit text, and bitmaps (JPEG and lossless). Gradients, line/fill styles, colour transforms, blend modes, clip masks and filters are honoured.
- Status — newer and less battle-tested than the parser; the rendering surface may still evolve.
Part of the ShockwaveFlash project · MIT © Aerafal
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SharpCompress (>= 0.39.0)
- ShockwaveFlash (>= 1.6.0)
- SkiaSharp (>= 2.88.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.