danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.6k forks source link

Different Resize Qualities Yield the Same Results #1973

Open Phebonacci opened 7 years ago

Phebonacci commented 7 years ago

Hi Danial!

Great library you got here! I've run into a problem with implementing the resize directive, though, but it could just be my mistake. I tried different values for 'quality' but the resulting file size is still the same. Here is my full configuration:

`<div ngf-select="blogVM.onProcessedCoverImgSelected($files)" ngf-drop="blogVM.onProcessedCoverImgSelected($files)" ngf-resize="{width: 1920, height: 1080, quality: .1, centerCrop: true, pattern='.jpg', restoreExif: false}" ngf-resize-if="$width

1920 || $height > 1080" ng-model="blogVM.fileSelect.selectedFiles" ngf-model-options="{ allowInvalid: true, debounce: 0 }" ngf-multiple="false" ngf-accept="image/*" ngf-capture="false" ngf-drag-over-class="{ pattern: '.png,.jpg,.jpeg', accept: 'accept-files', reject: 'reject-files', delay: 100 }" ngf-validate="{ pattern: vm.fileSelect.pattern, size: { max: '200KB' } }" ngf-keep="'distinct'" ngf-fix-orientation="true" ngf-max-files="2" ngf-ignore-invalid="'maxSize'">

`

Hope someone could help me. Thanks.