Skip to content

M4.90: Save for Web (Legacy) - #111

Merged
bflatastic merged 1 commit into
mainfrom
pr/m4-save-for-web
Oct 5, 2026
Merged

bflatastic merged 1 commit into
mainfrom
pr/m4-save-for-web

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Save for Web (Legacy): previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML.

M4.90: Save for Web (Legacy)

  • document.exportForWeb options:
    • Palette formats: reduction, colours, dither, transparency, matte, interlace, web snap and lossy GIF. The colour table can lock colours, map them to transparent, web-shift them and sort.
    • JPEG: quality, progressive, optimized and ICC profile.
    • All formats: image size, anti-aliasing, clip to artboard, sRGB and metadata.
    • Slices (from M4.88–M4.89: slices and the Slice tools #97): saved as images only, or as HTML plus images, with each slice's URL, target, alt text and message.
  • document.exportForWeb.preview: returns the exact file size, the download time and the colour table.
  • Presets: webExport.presets.* manage presets; the built-in ones are generated in code. webExport.settings remembers the last settings.
  • Dialog: saveForWeb, opened with Ctrl/Cmd+Alt+Shift+S.
    • Views: Original, Optimized, 2-Up and 4-Up.
    • A clickable colour table.
    • Buttons: Save… (Download on the web) and Preview in Browser.
  • Not done: per-slice settings, transparency dither, JPEG blur, and the dialog's own hand, zoom and eyedropper tools.
  • Bug found on main: the image crate decodes JPEGs that use optimized Huffman tables with the wrong colours. The preview works around it; the decoder bug itself is a follow-up.
  • No existing test changed.

Checks

  • This PR is the 8th of 9 in a stack, merged in order on main at e2e36f2 (M4.76: EPS export #103).
    • Conflicts in shared files were merged keeping both sides: format tables, test modules, the dialog registry, docs/mcp.md and docs/control-protocol.md.
    • cargo fmt ran on every commit.
  • cargo xtask ci passes all 7 steps (fmt, clippy, tests, assets, brands, layers, wasm) on the top of the stack, with 2,769 tests.
    • Each branch also passed CI on its own before it was stacked, except PDF security: its final edits (removing the guard) were tested in the stack.
  • Nothing dropped: compared with main, the stack keeps every test (2556 → 2764 by name), every engine command (565 → 586), every UI command and menu entry, and every MCP tool. Changed tests are named above.
  • docs/mcp.md code fences are balanced.

🤖 Generated with Claude Code

…PNG-8 and PNG-24 images, slices and HTML

File > Export > Save for Web (Legacy) (Ctrl/Cmd+Alt+Shift+S) opens a dialog with Original,
Optimized, 2-Up and 4-Up views showing each file's size and download time, and settings for
colour reduction, colours, dither, transparency and matte, interlacing, web snap, lossy GIF,
JPEG quality, the colour table (lock, map to transparent, web shift, sort), image size and
anti-aliasing, Clip to Artboard, sRGB, metadata, slices (all or selected), HTML output and
presets. Preview in Browser opens the HTML page.

Engine: document.exportForWeb, document.exportForWeb.preview (its byte count is the size of
the file Save writes), webExport.settings and webExport.presets.list/save/delete. Saved presets
and the remembered settings are stored in Prefs. Render: quantize_locked, and encode::web for
web snap, colour table edits, lossy GIF and GIF/JPEG comments. PNG files get an sRGB chunk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit 39a7af7 into main Oct 5, 2026
@bflatastic
bflatastic deleted the pr/m4-save-for-web branch October 5, 2026 08:32
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.

1 participant