add webp to capture formats #1671

pull/1717/head
Mikael Finstad 2023-08-24 00:17:30 +02:00
rodzic 1a64df2922
commit 65f0ad7c96
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -485,7 +485,14 @@ const App = memo(() => {
const { ensureWritableOutDir, ensureAccessToSourceDir } = useDirectoryAccess({ setCustomOutDir });
const toggleCaptureFormat = useCallback(() => setCaptureFormat(f => (f === 'png' ? 'jpeg' : 'png')), [setCaptureFormat]);
const toggleCaptureFormat = useCallback(() => setCaptureFormat((f) => {
const captureFormats = ['jpeg', 'png', 'webp'];
let index = captureFormats.indexOf(f);
if (index === -1) index = 0;
index += 1;
if (index >= captureFormats.length) index = 0;
return captureFormats[index];
}), [setCaptureFormat]);
const toggleKeyframeCut = useCallback((showMessage) => setKeyframeCut((val) => {
const newVal = !val;