Feat: Pass max size to gif assembler

This commit is contained in:
2026-03-20 23:20:30 -07:00
parent bede5bb298
commit f456e46a15

View File

@@ -59,6 +59,7 @@ async function handleGenerate() {
const model = el.selModel?.value || 'google/gemini-3.1-flash-image-preview';
const frameCount = Math.max(2, Math.min(24, Number.parseInt(el.inpFrames?.value || '4', 10) || 4));
const fps = Math.max(1, Math.min(30, Number.parseInt(el.inpFps?.value || '4', 10) || 4));
const maxSize = Math.max(32, Math.min(1024, Number.parseInt(el.inpMaxSize?.value || '256', 10) || 256));
const imageSize = '1K';
const aspectRatio = el.selRatio?.value || '1:1';
@@ -109,7 +110,7 @@ async function handleGenerate() {
}
setProgress(el, 100, 'assembling gif...');
const blob = await assembleGif(allFrames, fps);
const blob = await assembleGif(allFrames, fps, maxSize);
currentGifUrl = URL.createObjectURL(blob);
showResult(el, currentGifUrl);
setProgress(el, 100, 'done! 🎉');