Closed ndanvers closed 4 years ago
Hello there and thank you for this wonderful package.
Current Behavior: Within image-compression.js, the quality is set via: let quality = 1
image-compression.js
let quality = 1
It is further affected in the case of a jpeg:
if (file.type === 'image/jpeg') { quality *= 0.95 }
Desired Behavior Ability to input a quality field in the options passed to browser-image-compressor, like so:
let options = { maxSizeMB: 2, maxWidthOrHeight: 2048, quality: 0.5 }
reasoning I believe that there are certain use cases where it would be extremely useful to have more control over this.
Thank you again
Added initialQuality options in v1.0.13 e.g.:
initialQuality
const options = { maxSizeMB: 2, maxWidthOrHeight: 2048, initialQuality: 0.5 }
Thank you
Fantastic, thank you for this addition.
Hello there and thank you for this wonderful package.
Current Behavior: Within
image-compression.js
, the quality is set via:let quality = 1
It is further affected in the case of a jpeg:
Desired Behavior Ability to input a quality field in the options passed to browser-image-compressor, like so:
reasoning I believe that there are certain use cases where it would be extremely useful to have more control over this.
Thank you again