Remove autoOrientJPEG and consolidate downscaling logic
This commit is contained in:
parent
3eed6cb350
commit
09b5e6ef50
10 changed files with 105 additions and 144 deletions
|
@ -609,12 +609,12 @@ export async function fetchLinkPreviewImage(
|
|||
const dataBlob = new Blob([data], {
|
||||
type: contentType,
|
||||
});
|
||||
const { blob: xcodedDataBlob } = await scaleImageToLevel(
|
||||
dataBlob,
|
||||
const { blob: xcodedDataBlob } = await scaleImageToLevel({
|
||||
fileOrBlobOrURL: dataBlob,
|
||||
contentType,
|
||||
dataBlob.size,
|
||||
false
|
||||
);
|
||||
size: dataBlob.size,
|
||||
highQuality: false,
|
||||
});
|
||||
const xcodedDataArrayBuffer = await blobToArrayBuffer(xcodedDataBlob);
|
||||
|
||||
data = new Uint8Array(xcodedDataArrayBuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue