A multi-megabyte base64 image src lives inline in the document's PenNode::Image.src, so every scene rebuild clones + compares it and the canvas decodes a full-resolution bitmap — moving a 5.4MB image lagged. Shrink an oversized raster source the moment it enters the document, at every host path that produces an inline data: URL into the doc src: file-pick import / fill-image / relink (persistence_image), fetched + searched images (image_search_session), and inline-base64 AI generations (image_generate_host). New image_downscale module decodes via skia, fits the longest edge to 2048px (or re-encodes a >2MB source at native size), and emits JPEG for opaque sources / PNG for alpha — adopting the result only when it actually shrinks. Animated GIF / WebP are detected by magic bytes and left whole so re-encoding never drops frames. |
||
|---|---|---|
| .. | ||
| op-acp | ||
| op-ai | ||
| op-ai-skills | ||
| op-cli | ||
| op-codegen | ||
| op-config-store | ||
| op-design-lint | ||
| op-editor-core | ||
| op-editor-host-core | ||
| op-editor-ui | ||
| op-figma | ||
| op-git | ||
| op-host-desktop | ||
| op-host-native | ||
| op-host-services | ||
| op-host-web | ||
| op-host-web-server | ||
| op-i18n | ||
| op-mcp | ||
| op-opmerge | ||
| op-orchestrator | ||
| op-pen-loader | ||
| op-process-io | ||
| op-rpc-transport | ||
| op-smoke | ||
| op-web-sdk | ||
| CLAUDE.md | ||