import { noImageProcessingAtom } from "@/atoms/userSettingsAtom"; import { useAtomValue } from "jotai"; import React, { useEffect } from "react"; type ImageFormatSelectProps = { batchMode: boolean; saveImageAs: string; setExportType: (arg: string) => void; }; export function ImageFormatSelect({ batchMode, saveImageAs, setExportType, }: ImageFormatSelectProps) { const noImageProcessing = useAtomValue(noImageProcessingAtom); useEffect(() => { if (noImageProcessing) { setExportType("png"); } }, [noImageProcessing]); return (

SAVE IMAGE AS

{/*

EXPERIMENTAL

*/}
{batchMode &&

} {noImageProcessing && (

{batchMode && "Only PNG is supported in Batch Upscayl."} Only PNGs are saved without image processing to preserve image quality.

)}
{/* PNG */} {/* JPG */} {/* WEBP */}
); }