Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/utils/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ export class RawImage {
resample = 2,
} = {}) {

// Do nothing if the image already has the desired size
if (this.width === width && this.height === height) {
return this;
}

// Ensure resample method is a string
let resampleMethod = RESAMPLING_MAPPING[resample] ?? resample;

Expand Down Expand Up @@ -742,4 +747,4 @@ export class RawImage {
}
});
}
}
}
Loading