Skip to content

SVG optimisation from Phil. Make SVG the default.#191

Merged
s-andrews merged 5 commits into
masterfrom
svg
May 20, 2026
Merged

SVG optimisation from Phil. Make SVG the default.#191
s-andrews merged 5 commits into
masterfrom
svg

Conversation

@s-andrews
Copy link
Copy Markdown
Owner

Merge optimisation fixes from @ewels and change the launch script to make SVG the default format with an option of --png if people still want that.

ewels and others added 5 commits April 15, 2026 15:14
Reduce SVG file sizes by:
- Moving font-family to a CSS <style> block instead of per-element attributes
- Using fill/stroke attributes instead of verbose style="..." syntax
- Merging consecutive same-colour <line> segments into <polyline> elements
- Run-length merging adjacent same-colour <rect> elements (benefits tile heatmap)
- Increasing line stroke-width to 2 for better visibility

SVG generation changes are in SVGGenerator.java (attribute format).
Post-processing optimisations are in SVGImageSaver.java (polyline/rect merging).
PNG rendering is unaffected as it uses Java2D directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Optimise SVG plots, bump SVG line widths
@s-andrews s-andrews merged commit a507b19 into master May 20, 2026
1 check failed
@s-andrews s-andrews deleted the svg branch May 20, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants