Captures App Store : export au format 6,3" (1206 × 2622) demandé par App Store Connect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tony AVERTY 2026-10-15 10:33:36 +02:00
parent c55fd4b5ed
commit 4835d580ef
6 changed files with 9 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

View file

@ -19,6 +19,15 @@ const W = 1320, H = 2868, NAMES = ['01-accroche', '02-tampon', '03-recompenses',
await page.screenshot({ path: path.join(out, `${name}.jpg`), type: 'jpeg', quality: 95, clip: { x: i * W, y: 0, width: W, height: H }, omitBackground: false }); await page.screenshot({ path: path.join(out, `${name}.jpg`), type: 'jpeg', quality: 95, clip: { x: i * W, y: 0, width: W, height: H }, omitBackground: false });
} }
await page.screenshot({ path: path.join(out, 'apercu-panorama.jpg'), type: 'jpeg', quality: 85 }); await page.screenshot({ path: path.join(out, 'apercu-panorama.jpg'), type: 'jpeg', quality: 85 });
// Format 6,3" (1206 × 2622) : celui qu'App Store Connect demande pour « iPhone avec Dynamic Island ».
const small = await browser.newPage({ viewport: { width: 1206, height: 2622 }, deviceScaleFactor: 1 });
fs.mkdirSync(path.join(out, '6.3'), { recursive: true });
for (const name of NAMES) {
const src = 'data:image/jpeg;base64,' + fs.readFileSync(path.join(out, `${name}.jpg`)).toString('base64');
await small.setContent(`<body style="margin:0"><img src="${src}" style="display:block;width:1206px;height:2622px"></body>`);
await small.screenshot({ path: path.join(out, '6.3', `${name}.jpg`), type: 'jpeg', quality: 95 });
}
await browser.close(); await browser.close();
console.log(`${NAMES.length} captures dans ${out}`); console.log(`${NAMES.length} captures dans ${out}`);
})(); })();