Remove maxWidth for png exports
This commit is contained in:
parent
6bec385811
commit
3436936349
1 changed files with 2 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
async (imgString) => {
|
||||
const exportMaxWidth = 4000;
|
||||
const tempImg = new Image();
|
||||
const loadImage = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
@ -12,8 +11,8 @@ async (imgString) => {
|
|||
};
|
||||
const img = await loadImage();
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = Math.min(img.width, exportMaxWidth);
|
||||
canvas.height = (canvas.width * img.height) / img.width;
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext("2d");
|
||||
if (!ctx) {
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue