import { useState } from "react"; import { useFileStore } from "@/stores/file-store"; import { useToolProcessor } from "@/hooks/use-tool-processor"; import { Download, Loader2 } from "lucide-react"; export function UpscaleSettings() { const { files } = useFileStore(); const { processFiles, processing, error, downloadUrl, originalSize, processedSize } = useToolProcessor("upscale"); const [scale, setScale] = useState(2); const handleProcess = () => { processFiles(files, { scale }); }; const hasFile = files.length > 0; return (
Uses Real-ESRGAN for AI upscaling when available, otherwise falls back to high-quality Lanczos interpolation.
{/* Error */} {error &&{error}
} {/* Size info */} {originalSize != null && processedSize != null && (Original: {(originalSize / 1024).toFixed(1)} KB
Upscaled: {(processedSize / 1024).toFixed(1)} KB
AI processing may take 10-30 seconds...