mirror of
https://github.com/vibegif/vibegif.lol.git
synced 2026-04-07 02:12:12 +00:00
Feat: Pass max size to gif assembler
This commit is contained in:
@@ -59,6 +59,7 @@ async function handleGenerate() {
|
|||||||
const model = el.selModel?.value || 'google/gemini-3.1-flash-image-preview';
|
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 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 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 imageSize = '1K';
|
||||||
const aspectRatio = el.selRatio?.value || '1:1';
|
const aspectRatio = el.selRatio?.value || '1:1';
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ async function handleGenerate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setProgress(el, 100, 'assembling gif...');
|
setProgress(el, 100, 'assembling gif...');
|
||||||
const blob = await assembleGif(allFrames, fps);
|
const blob = await assembleGif(allFrames, fps, maxSize);
|
||||||
currentGifUrl = URL.createObjectURL(blob);
|
currentGifUrl = URL.createObjectURL(blob);
|
||||||
showResult(el, currentGifUrl);
|
showResult(el, currentGifUrl);
|
||||||
setProgress(el, 100, 'done! 🎉');
|
setProgress(el, 100, 'done! 🎉');
|
||||||
|
|||||||
Reference in New Issue
Block a user