Made changes based on ZXY101 code review

This commit is contained in:
decodatain
2025-06-22 20:16:15 -06:00
parent 2fb5d4ae0a
commit 2493555faf
4 changed files with 10 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { settings } from "$lib/settings";
import { Settings, settings } from "$lib/settings";
import { showSnackbar } from "$lib/util"
import { get } from "svelte/store";
@@ -50,7 +50,7 @@ export async function blobToBase64(blob: Blob) {
});
}
export async function imageToWebp(source: File, settings: any) {
export async function imageToWebp(source: File, settings: Settings) {
const image = await createImageBitmap(source);
const canvas = new OffscreenCanvas(image.width, image.height);
const context = canvas.getContext("2d");