diff --git a/src/components/ImageExportDialog.tsx b/src/components/ImageExportDialog.tsx index 181fa5afc..c109162e4 100644 --- a/src/components/ImageExportDialog.tsx +++ b/src/components/ImageExportDialog.tsx @@ -186,11 +186,7 @@ const ImageExportModal = ({ appState, files, exportPadding: DEFAULT_EXPORT_PADDING, - maxWidthOrHeight: !( - exportBackgroundImage !== "solid" && exportWithBackground - ) - ? maxWidthOrHeight - : undefined, + maxWidthOrHeight, }) .then((canvas) => { setRenderError(null); diff --git a/src/packages/utils.ts b/src/packages/utils.ts index f8650e9de..d70922450 100644 --- a/src/packages/utils.ts +++ b/src/packages/utils.ts @@ -70,6 +70,20 @@ export const exportToCanvas = ({ (width: number, height: number) => { const canvas = document.createElement("canvas"); + if ( + appState?.exportBackground && + appState?.fancyBackgroundImageKey !== "solid" + ) { + const scale = appState?.exportScale ?? 1; + canvas.width = width * scale; + canvas.height = height * scale; + + return { + canvas, + scale, + }; + } + if (maxWidthOrHeight) { if (typeof getDimensions === "function") { console.warn(