-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Summary
screen.getImage() returns very low-resolution screenshots. The downloaded PNGs are only ~131–207px wide × 512px tall (23–32 KB each). For a mobile screen design, this makes the output blurry and unusable for review or presentation purposes.
Reproduction
import { Stitch, StitchToolClient } from "@google/stitch-sdk";
const client = new StitchToolClient({ apiKey: process.env.STITCH_API_KEY });
const sdk = new Stitch(client);
const project = await sdk.createProject("Test");
const screen = await project.generate("A mobile dashboard for a task list app", "MOBILE");
const imageUrl = await screen.getImage();
// Download the image at imageUrl → result is ~200x512px, very low resolutionActual dimensions of downloaded screenshots
| Screen | Width | Height | File size |
|---|---|---|---|
| Screen 1 | 207px | 512px | 24 KB |
| Screen 2 | 187px | 512px | 32 KB |
| Screen 3 | 161px | 512px | 28 KB |
| Screen 4 | 131px | 512px | 23 KB |
What I expected
Screenshots at a usable resolution — at minimum 1x device resolution (~390×844 for iPhone), ideally 2x or 3x (780×1688 or 1170×2532).
Notes from the SDK source
The tools-manifest.json mentions that the screenshot downloadUrl is a FIFE base URL and states:
"this contains the FIFE serving_base_url which requires additional FIFE URL options to be set for sizing"
However, getImage() takes no parameters and returns the bare FIFE URL with no sizing options appended. There's no way in the SDK to request a specific resolution.
Questions
- Is there a way to get higher-resolution screenshots via the SDK?
- Can FIFE URL parameters (e.g.
=w800,=s1200) be appended to the download URL to request a larger image? If so, what parameters are supported? - Would the SDK accept a
resolutionorscaleparameter ongetImage()in a future release?
Environment
@google/stitch-sdkv0.0.3- Node.js v22
- macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels