mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-21 21:19:31 +01:00
Fix compression
This commit is contained in:
parent
f034381a92
commit
21cfd29d2e
@ -24,3 +24,5 @@ export const noImageProcessingAtom = atomWithStorage<boolean>(
|
|||||||
"noImageProcessing",
|
"noImageProcessing",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const compressionAtom = atomWithStorage<number>("compression", 0);
|
||||||
|
@ -15,9 +15,6 @@ export function CompressionInput({
|
|||||||
EXPERIMENTAL
|
EXPERIMENTAL
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-base-content/80">
|
|
||||||
Please restart the app after changing this setting.
|
|
||||||
</p>
|
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
placeholder="Type here"
|
placeholder="Type here"
|
||||||
|
@ -143,17 +143,6 @@ function SettingsTab({
|
|||||||
currentlySavedRememberOutputFolder === "true" ? true : false
|
currentlySavedRememberOutputFolder === "true" ? true : false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!localStorage.getItem("compression")) {
|
|
||||||
logit("⚙️ Setting compression to 100%");
|
|
||||||
localStorage.setItem("compression", JSON.stringify(compression));
|
|
||||||
} else {
|
|
||||||
const currentlySavedCompression = localStorage.getItem("compression");
|
|
||||||
logit("⚙️ Getting compression from localStorage", compression);
|
|
||||||
if (currentlySavedCompression) {
|
|
||||||
setCompression(JSON.parse(currentlySavedCompression));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// HANDLERS
|
// HANDLERS
|
||||||
@ -164,7 +153,6 @@ function SettingsTab({
|
|||||||
|
|
||||||
const handleCompressionChange = (e) => {
|
const handleCompressionChange = (e) => {
|
||||||
setCompression(e.target.value);
|
setCompression(e.target.value);
|
||||||
localStorage.setItem("compression", e.target.value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleGpuIdChange = (e) => {
|
const handleGpuIdChange = (e) => {
|
||||||
|
@ -15,6 +15,7 @@ import { logAtom } from "../atoms/logAtom";
|
|||||||
import { modelsListAtom } from "../atoms/modelsListAtom";
|
import { modelsListAtom } from "../atoms/modelsListAtom";
|
||||||
import {
|
import {
|
||||||
batchModeAtom,
|
batchModeAtom,
|
||||||
|
compressionAtom,
|
||||||
dontShowCloudModalAtom,
|
dontShowCloudModalAtom,
|
||||||
noImageProcessingAtom,
|
noImageProcessingAtom,
|
||||||
outputPathAtom,
|
outputPathAtom,
|
||||||
@ -42,7 +43,6 @@ const Home = () => {
|
|||||||
const [overwrite, setOverwrite] = useState(false);
|
const [overwrite, setOverwrite] = useState(false);
|
||||||
const [upscaledBatchFolderPath, setUpscaledBatchFolderPath] = useState("");
|
const [upscaledBatchFolderPath, setUpscaledBatchFolderPath] = useState("");
|
||||||
const [doubleUpscaylCounter, setDoubleUpscaylCounter] = useState(0);
|
const [doubleUpscaylCounter, setDoubleUpscaylCounter] = useState(0);
|
||||||
const [compression, setCompression] = useState(0);
|
|
||||||
const [gpuId, setGpuId] = useState("");
|
const [gpuId, setGpuId] = useState("");
|
||||||
const [saveImageAs, setSaveImageAs] = useState("png");
|
const [saveImageAs, setSaveImageAs] = useState("png");
|
||||||
const [zoomAmount, setZoomAmount] = useState("100%");
|
const [zoomAmount, setZoomAmount] = useState("100%");
|
||||||
@ -57,6 +57,7 @@ const Home = () => {
|
|||||||
|
|
||||||
// ATOMIC STATES
|
// ATOMIC STATES
|
||||||
const [outputPath, setOutputPath] = useAtom(outputPathAtom);
|
const [outputPath, setOutputPath] = useAtom(outputPathAtom);
|
||||||
|
const [compression, setCompression] = useAtom(compressionAtom);
|
||||||
const [progress, setProgress] = useAtom(progressAtom);
|
const [progress, setProgress] = useAtom(progressAtom);
|
||||||
const [batchMode, setBatchMode] = useAtom(batchModeAtom);
|
const [batchMode, setBatchMode] = useAtom(batchModeAtom);
|
||||||
const [logData, setLogData] = useAtom(logAtom);
|
const [logData, setLogData] = useAtom(logAtom);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user