Lines 144-184javascript
144 const scale = Math.min(boxW / imgW, boxH / imgH);
145 const width = Math.max(1, Math.round(imgW * scale));
146 const height = Math.max(1, Math.round(imgH * scale));
147 const left = margin + Math.round((boxW - width) / 2);
148 const top = boxTop + Math.round((boxH - height) / 2);
152 photo: { left, top, width, height },
153 captionRegion: caption === "none"
156 top: caption === "top" ? margin : boxBottom + gap,
157 height: captionBlock,
165 * Build the caption from metadata: the exposure recipe, plus the camera
166 * model on top — but only when explicitly requested (`includeCamera`).
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
dist/frame.jsView on unpkg · L164 168export function buildCaption(metadata, file, includeCamera = false) {
169 const model = metadata.Model ?? metadata.Make;
170 const title = includeCamera && model ? String(model).trim().toUpperCase() : "";
172 const num = (v) => (typeof v === "number" ? v : Number(v));
173 if (metadata.FocalLength !== undefined) {
174 parts.push(`${num(metadata.FocalLength)}mm`);
176 if (metadata.FNumber !== undefined)
177 parts.push(`f/${num(metadata.FNumber)}`);
178 if (metadata.ExposureTime !== undefined) {
179 parts.push(formatExposure(metadata.ExposureTime));
181 if (metadata.ISO !== undefined)
182 parts.push(`ISO ${metadata.ISO}`);
183 let details = parts.join(" · ");