Skip to content

fix: never upscale captures, and name their image metadata image - #69

Merged
iamnbutler merged 1 commit into
mainfrom
fix/capture-image
Oct 17, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
fix/capture-image

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Two leftovers from #36.

ace_image → image

  • Renamed in the desktop_inspect, desktop_screen and desktop_menubar_click results: {width, height, note}.
  • No legacy alias, because I found nothing external that reads it:
    • ace2's channel (packages/channel/src/desktop.ts), the only package that depends on desktop-tools, passes through the top-level image content and never parses ace_image.
    • Nothing else under ~/code mentions it, and the docs never did.
  • Models see the field name only in result text.

No upscaling

  • screenshot() used sips --resampleHeightWidthMax 1600, which enlarges anything smaller than that, such as a narrow display or any window under 1600 px.
  • It now reads the source size first and caps each attempt at the source's longest side. Smaller sources are converted to JPEG without resampling. The 1200 and 800 retries for the 900 KB limit still apply, and still only shrink.
  • The image notes now say "scaled down when large but never up".

Checked by running the built screenshot() on fixtures:

  • 1000×600 PNG → 1000×600 JPEG (previously 1600×960).
  • 3000×2000 → 1600×1066.

npm run check passes. No native changes.

@iamnbutler
iamnbutler merged commit f9635f9 into main Oct 17, 2026
2 checks passed
@iamnbutler
iamnbutler deleted the fix/capture-image branch October 17, 2026 05:00
@iamnbutler iamnbutler mentioned this pull request Oct 17, 2026
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