You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using iPad with iOS 16 and a modified version of the test website that does the following to remove the maxWidthOrHeight option:
varoptions={maxSizeMB: parseFloat(document.querySelector("#maxSizeMB").value),maxWidthOrHeight: parseFloat(document.querySelector("#maxWidthOrHeight").value),useWebWorker: useWebWorker,onProgress: onProgress,};// andy updates startdeleteoptions.maxWidthOrHeight;console.log(`>>> options = ${JSON.stringify(options)}`);// andy updates end
I am using this image (it's 4.8 MB original size)
Compression is "stuck" at around 25% and an error is thrown. See console:
--
Docs in the README read as:
// you should provide one of maxSizeMB, maxWidthOrHeight in the options
const options: Options = {
maxWidthOrHeight: number, // compressedFile will scale down by ratio to a point that width or height is smaller than maxWidthOrHeight (default: undefined)
// but, automatically reduce the size to smaller than the maximum Canvas size supported by each browser.
// Please check the Caveat part for details.
And in "Caveats"
Each browser limits the maximum size of a Canvas object.
So, we resize the image to less than the maximum size that each browser restricts.
(However, the proportion/ratio of the image remains.)
So I assumed not using this option would mean a sensible default would be plugged in by the library.
Is there some code you use to calculate this default if that is the case?
The text was updated successfully, but these errors were encountered:
I am using iPad with iOS 16 and a modified version of the test website that does the following to remove the
maxWidthOrHeight
option:I am using this image (it's 4.8 MB original size)
Compression is "stuck" at around 25% and an error is thrown. See console:
--
Docs in the README read as:
And in "Caveats"
So I assumed not using this option would mean a sensible default would be plugged in by the library.
Is there some code you use to calculate this default if that is the case?
The text was updated successfully, but these errors were encountered: