first implementation of itxt on image.ts

This commit is contained in:
Gabriel Gomes 2025-03-29 20:23:12 +00:00
parent 04d0b00b95
commit 22869ee58c
2 changed files with 63 additions and 19 deletions

View file

@ -101,9 +101,10 @@ export const exportToBlob = async (
mimeType?: string;
quality?: number;
exportPadding?: number;
useITXt?: boolean;
},
): Promise<Blob> => {
let { mimeType = MIME_TYPES.png, quality } = opts;
let { mimeType = MIME_TYPES.png, quality, useITXt = true } = opts;
if (mimeType === MIME_TYPES.png && typeof quality === "number") {
console.warn(`"quality" will be ignored for "${MIME_TYPES.png}" mimeType`);
@ -150,6 +151,7 @@ export const exportToBlob = async (
opts.files || {},
"local",
),
useITXt,
});
}
resolve(blob);