mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-02 22:20:50 -06:00
Save for Web: saving and Preview in Browser warn when an image couldn't be decoded
document.exportForWeb renders the artboard or the art and writes GIF, JPEG, PNG-8 or PNG-24 files. When the art held an image that the renderer could not decode, the renderer drew nothing for it, and the files lacked the image with no message: the reply had no warnings at all. A raster export of the same art warns that "an image couldn't be decoded and is missing from the picture". document.exportForWeb and document.exportForWeb.preview now compare decode_failures before and after they render, as raster exports do, and their replies carry that text in `warnings`. The files are still written. Save, Download and Preview in Browser in the Save for Web dialog show the first warning in the status bar as Save As shows a save's notes. Docs: docs/mcp.md (Save for Web), docs/control-protocol.md.
This commit is contained in:
@@ -675,7 +675,8 @@ a preset) plus `__view` (`original`, `optimized`, `2up`, `4up`), `__zoom` (`fit`
|
||||
`__color` (the colour table's selected colour). `ui.dialog.confirm` remembers the settings and saves (a save panel for
|
||||
the image, or the page with HTML output; the web downloads the files); with `discard: true` it is Done: it remembers
|
||||
the settings and closes. `file.saveForWeb` with settings saves without the dialog, and `file.saveForWeb.browser`
|
||||
writes the HTML page to a temporary folder and opens it in the default browser (desktop).
|
||||
writes the HTML page to a temporary folder and opens it in the default browser (desktop). Both return the export's
|
||||
`warnings`, and the status bar shows the first one as Save As shows a save's notes.
|
||||
|
||||
PSD Options: Export As… with the PSD format (`file.exportAs {format: "psd"}`, then the save dialog) opens `psdOptions`:
|
||||
the raster rows of PNG Options (`ppi`, `background`, `antiAlias`), then `colorModel` (`rgb`, `cmyk`, `gray`; a CMYK
|
||||
|
||||
Reference in New Issue
Block a user