{"_id":"@across-the-stars/ngx-img-max","_rev":"3-10703c2d4d12934c6cf2a78c57437243","name":"@across-the-stars/ngx-img-max","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@across-the-stars/ngx-img-max","version":"0.0.1","scripts":{"ng":"ng","start":"ng serve","build":"rm -rf dist && ng build ngx-img-max --configuration production","test":"ng test ngx-img-max","lint":"ng lint ngx-img-max","e2e":"ng e2e"},"private":false,"dependencies":{"@angular/animations":"~9.1.13","@angular/common":"~9.1.13","@angular/compiler":"~9.1.13","@angular/core":"~9.1.13","@angular/forms":"~9.1.13","@angular/platform-browser":"~9.1.13","@angular/platform-browser-dynamic":"~9.1.13","@angular/router":"~9.1.13","exifr":"^7.1.3","pica":"^9.0.1","rxjs":"~6.5.4","tslib":"^1.10.0","zone.js":"~0.10.2"},"devDependencies":{"@angular-devkit/build-angular":"~0.901.15","@angular-devkit/build-ng-packagr":"~0.901.15","@angular/cli":"~9.1.15","@angular/compiler-cli":"~9.1.13","@types/node":"^12.11.1","@types/jasmine":"~3.5.0","@types/jasminewd2":"~2.0.3","codelyzer":"^5.1.2","jasmine-core":"~3.5.0","jasmine-spec-reporter":"~4.2.1","karma":"~5.0.0","karma-chrome-launcher":"~3.1.0","karma-coverage-istanbul-reporter":"~2.1.0","karma-jasmine":"~3.0.1","karma-jasmine-html-reporter":"^1.4.2","ng-packagr":"^9.0.0","protractor":"~7.0.0","ts-node":"~8.3.0","tslint":"~6.1.0","typescript":"~3.8.3"},"gitHead":"4cef913ec56d52f453f4941896e581660f230b13","description":"Package compiled for Angular 9; new versions may come up soon (no promise)","_id":"@across-the-stars/ngx-img-max@0.0.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-zZCjjqYh8QVnlQVnqakQ5Tz+Y+26yF1uJZzVeQo45bt+bRUsE0VXpfPVxHrtkl7Hc1DiwPn/OOKGfqFSt/yvvA==","shasum":"6db663fd698a9c6e4b201f27c171e154005af9a6","tarball":"https://registry.npmjs.org/@across-the-stars/ngx-img-max/-/ngx-img-max-0.0.1.tgz","fileCount":26,"unpackedSize":40474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9oXMHxVYb0Yne7jifF+TAcs85qNx0c1UHFSgzA10YwAiAtdoMhOMgf6+mUDxe1HzH2IXImp+JFjahhc8DG1RvslA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxX8WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7cA//UXwSJvcTUq804BB2ZRSJ0whEe+wcz94dvBMD6EtiNcdiLXPE\r\noAdlbek8nuJ4UQLvvI0hu9sMYZkpcf+qdudJ2MURtILSwrsFGQQ06IojcABA\r\n4TYnp+ZkC11RyVZ2/czMKcJgr5IsAzOUTT3CHjoQKaRS05j9hO2QKqhqcXKB\r\n4suAKmEBfnXGGhzSCO+qtp+BW11ghhwLaZ8zqGey8RNFNTFm9cI/pg10+ok/\r\nOeYLjpVJhyWdgn9VGPAOSQlgcPFdv9Tax9HHKWi5Suq6vz/wTIP0IC22IAiH\r\napi8VHIRrF+drMsg2SnctHFh2vGFAgdEJBxnWPEw52W5sHAGvh9nFhR8MzQ3\r\nmW9Zmd4XlAFAet7mObZJtIcBVBtzrYjqTCQFY6VtBdyI/MoOm1Z3qVXoSm4Q\r\njmT8leAfZXIYfGDORE/YCHHwhDnO2HJYjaR2kuSP5v3XHI9bfMmDziGcuaBr\r\nF769znnLji5xWE6xwmLG+BrDkD7vorIeftFfQ2sbdbWPrS93dPKTC/SUKnnz\r\nefgb1HdaZ7hTcIVm3KOuzl12eFHX0McBcsBNuk0scqHUzELqcUnPYQFklXFU\r\nQPA3b+ebYvjOi6g/ruwnQSKwZqqVsvw7rnRhngc1IN7Ny4u4PFYZun0MgkEk\r\nHJJPhTLujcvAIowkrCFYXcJw40N1ImWDbh8=\r\n=MVzQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"across-the-stars","email":"iapachecorios@protonmail.com"},"directories":{},"maintainers":[{"name":"across-the-stars","email":"iapachecorios@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-img-max_0.0.1_1673887509902_0.6012242833224937"},"_hasShrinkwrap":false},"0.0.2":{"name":"@across-the-stars/ngx-img-max","version":"0.0.2","description":"Angular module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.","repository":{"type":"git","url":"git+https://github.com/across-the-stars/ngx-img-max.git"},"bugs":{"url":"https://github.com/across-the-stars/ngx-img-max/issues"},"homepage":"https://github.com/across-the-stars/ngx-img-max#readme","keywords":["angular","angular9","img-max","maximal","size","limit","resize"],"scripts":{"ng":"ng","start":"ng serve","build":"rm -rf dist && ng build ngx-img-max --configuration production","test":"ng test ngx-img-max","lint":"ng lint ngx-img-max","e2e":"ng e2e"},"private":false,"dependencies":{"@angular/animations":"~9.1.13","@angular/common":"~9.1.13","@angular/compiler":"~9.1.13","@angular/core":"~9.1.13","@angular/forms":"~9.1.13","@angular/platform-browser":"~9.1.13","@angular/platform-browser-dynamic":"~9.1.13","@angular/router":"~9.1.13","exifr":"^7.1.3","pica":"^9.0.1","rxjs":"~6.5.4","tslib":"^1.10.0","zone.js":"~0.10.2"},"devDependencies":{"@angular-devkit/build-angular":"~0.901.15","@angular-devkit/build-ng-packagr":"~0.901.15","@angular/cli":"~9.1.15","@angular/compiler-cli":"~9.1.13","@types/node":"^12.11.1","@types/jasmine":"~3.5.0","@types/jasminewd2":"~2.0.3","codelyzer":"^5.1.2","jasmine-core":"~3.5.0","jasmine-spec-reporter":"~4.2.1","karma":"~5.0.0","karma-chrome-launcher":"~3.1.0","karma-coverage-istanbul-reporter":"~2.1.0","karma-jasmine":"~3.0.1","karma-jasmine-html-reporter":"^1.4.2","ng-packagr":"^9.0.0","protractor":"~7.0.0","ts-node":"~8.3.0","tslint":"~6.1.0","typescript":"~3.8.3"},"gitHead":"c721e41f31d96131bc4a7d0fa8e2362bfcec03d5","_id":"@across-the-stars/ngx-img-max@0.0.2","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-6D7qmQ3iTnoIONSvd519PwXe4NBSVhT896uJ4/fOiCQnGR1i7kxO3Sy0d1v9aJBpOuKZDOxOAvy0rwytZXG79w==","shasum":"0f257209e47138ef77d0d965475b25ecb87f0fb1","tarball":"https://registry.npmjs.org/@across-the-stars/ngx-img-max/-/ngx-img-max-0.0.2.tgz","fileCount":26,"unpackedSize":41030,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDleAetBFMYZcjlgdCPKbErwYQUK3kI17mzOrbZsiynaQIhAJn4alzqIRh75K39eiDRP0Bb5NseU63YMafXqN3FbLKY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxYGFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6Hg//TQV4qMzlAN70RZMEW0/wgefNtcXy3ImJtcdSrYaKALiN/w9Z\r\n6BA9MT3cYbfPUf0xfOo3Tyju6UlU01AkjXBlmbMbRUUPnOpTutZBiRxSBWqa\r\nLWGr1rLxObOIuGtuCM3XRBfgHxTiR5T2GBHwmOzHApFJTPrq8+T0QKs/aLku\r\nSwMgdOJt695MrruZ0yjN/1vCuZdMxKogBV9NIXIWXutRIieySx9/XD84rZo1\r\nGqEBDNMUVsydDtFIwLEHPw8oa+GILpK92ryZno1Z3paC4MxaorpHJuMf8E4C\r\nXJVUgwaHZwOyINp68C9UCo0vLE9mKsc+0Zj/WLJU0g+xIAzNgMHYhCbbSfgU\r\nUkenBJ2IrsDpLOVcKl82ZEUjktsJKTHweUDoFDguZM/V8ZluqtY1NGAUtnul\r\niLzXW45LfpYDYDeddFL5/uAqqjtNsecZ/QFkUpptX9yVj+h6+SZQmFsfVDh1\r\np5ediLbjyxZqj8l1Od7uPITILW71fT0h1dKKKHyFk25qIYZYmzxfrHz6AElu\r\nWCWyCyf7o164sWrPw62nf7q1LK0NM7iUcLEz8nia0b6zvoFs8zJn0BRbZ8z8\r\nEJrTba2vCmqvU1zF1hi1454xJg7TF46+0j/5krhj8h4vdQPO4UWJsqnpr1a4\r\noY/MxEF0fah329vgXVGOHnJJAewn1C5C6Ys=\r\n=uiil\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"across-the-stars","email":"iapachecorios@protonmail.com"},"directories":{},"maintainers":[{"name":"across-the-stars","email":"iapachecorios@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-img-max_0.0.2_1673888133158_0.5712586946747436"},"_hasShrinkwrap":false},"0.0.3":{"name":"@across-the-stars/ngx-img-max","version":"0.0.3","description":"Angular module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.","repository":{"type":"git","url":"git+https://github.com/across-the-stars/ngx-img-max.git"},"bugs":{"url":"https://github.com/across-the-stars/ngx-img-max/issues"},"homepage":"https://github.com/across-the-stars/ngx-img-max#readme","keywords":["angular","angular9","img-max","maximal","size","limit","resize"],"peerDependencies":{"@angular/common":"^9.1.13","@angular/core":"^9.1.13"},"dependencies":{"tslib":"^1.10.0"},"main":"bundles/ngx-img-max.umd.js","module":"fesm5/ngx-img-max.js","es2015":"fesm2015/ngx-img-max.js","esm5":"esm5/ngx-img-max.js","esm2015":"esm2015/ngx-img-max.js","fesm5":"fesm5/ngx-img-max.js","fesm2015":"fesm2015/ngx-img-max.js","typings":"ngx-img-max.d.ts","metadata":"ngx-img-max.metadata.json","sideEffects":false,"_id":"@across-the-stars/ngx-img-max@0.0.3","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-a6MZSHuGGOoqcv9+egZcGOVUcqjTV04uTe16UtiEwD0wp9lswg9hpP9QjQmpx6jkRWq3w4XEVuPC36rLKjm/Wg==","shasum":"5c4a4b6f22648c99dd189cbec1a32a1d51653759","tarball":"https://registry.npmjs.org/@across-the-stars/ngx-img-max/-/ngx-img-max-0.0.3.tgz","fileCount":38,"unpackedSize":492241,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGULiRsWvsWthJXuZflAIMo2k+MbIQk/jEQa1vEfuBRwAiEA4VBR6C0lIje98akTUWRFt2+ZngEHLk5xEFoyiipBwHA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxYpKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoeBA//QVRA+PWoZPX+8UMOBqlWz6xp4ZxMXAy0h7I2aBtrRaHgX2z5\r\ne1S9m5t3UjwMzAh9DRWXzdxUSaWNF2ORu+G+tF57vG03z0f05tjM1ce4ouno\r\nbNYAX7Ff2PRkTvNOv1OUMtp4dC0Ofq9ZxObtrS8YkSxWwdqzth9Vdmuhc4n8\r\nvIhq97d0EUelcnXSp9Ee89ZE7mq3/3DgJKPgUZNX7v7K2Iu05UMUtIoE15//\r\nhxzmkvnvqJ0Ep6h4vIYJvlODswxZ5GWGaNNWGMZ8vmR4QvZaG6RGDQFfd603\r\n7pmhxSW8Pf4nQ3jOROQStYcRZPJsX3MV9B33iKuwpss99ABXpKTDM03cDopp\r\npBgUIhVQqFdgAD6LwszfUPKyfVJJ2xgCW7qk5jg+Hu/bL5Ei4Cv2HIaYdrJU\r\n5b9lHz3GBt7cL4Dog0bu5YP5TuTBUYPv2+RM+reNDHQcu2MuUMBEZ05I26et\r\nxfNUl7fGdlEPiW4E3Lm36v3cFuPF1mYM60ZgG1RUwwVOlLwnvyXKCvqHYMKN\r\nKSrufaCohQydCCUUHQ5QhagHPsNJ95ACj9rFcBIozeRq0hbg07j+2Ne2GrJ3\r\nUVIyrfcecTOHnewzX0TG13kw1PTUzjAU8+g1vl7QWxbcnl3Tu4bpOqQVXmjf\r\nFepJxbAfz/5pxKdJqKomzweM1UJlFoFCUb4=\r\n=tADE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"across-the-stars","email":"iapachecorios@protonmail.com"},"directories":{},"maintainers":[{"name":"across-the-stars","email":"iapachecorios@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-img-max_0.0.3_1673890378003_0.7423816218832278"},"_hasShrinkwrap":false},"0.0.4":{"name":"@across-the-stars/ngx-img-max","version":"0.0.4","description":"Angular module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.","repository":{"type":"git","url":"git+https://github.com/across-the-stars/ngx-img-max.git"},"bugs":{"url":"https://github.com/across-the-stars/ngx-img-max/issues"},"homepage":"https://github.com/across-the-stars/ngx-img-max#readme","keywords":["angular","angular9","img-max","maximal","size","limit","resize"],"peerDependencies":{"@angular/common":"^9.1.13","@angular/core":"^9.1.13"},"dependencies":{"tslib":"^1.10.0"},"main":"bundles/across-the-stars-ngx-img-max.umd.js","module":"fesm5/across-the-stars-ngx-img-max.js","es2015":"fesm2015/across-the-stars-ngx-img-max.js","esm5":"esm5/across-the-stars-ngx-img-max.js","esm2015":"esm2015/across-the-stars-ngx-img-max.js","fesm5":"fesm5/across-the-stars-ngx-img-max.js","fesm2015":"fesm2015/across-the-stars-ngx-img-max.js","typings":"across-the-stars-ngx-img-max.d.ts","metadata":"across-the-stars-ngx-img-max.metadata.json","sideEffects":false,"_id":"@across-the-stars/ngx-img-max@0.0.4","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-jXIX25p29On0+qD6J/sF49pySt5DqWX9yOjntNq2aQhFi2Rp1agESBYNhNVcaYEWj7F4FxSQjEPPVrWVr/0G2w==","shasum":"10bff535225400943e9150f440e563cd337d3fe9","tarball":"https://registry.npmjs.org/@across-the-stars/ngx-img-max/-/ngx-img-max-0.0.4.tgz","fileCount":38,"unpackedSize":497810,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICKBz2DdagJtuYk4a5t+THkr8aVeeScIgaMNsJ8piGAsAiBBBZnUSEeywjm9/SVDmW9FlXaywqb6FVHojbISoByp3w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxZRPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/rQ//YSGWSCAcy0yZfU3opycJ08JRVrPxf5hVL+AUm6nbUF0rQFT0\r\nPqUxD967Rg5q9JucnMYO8IpCOGfM7Y7qBmgBBzWQftVVa4K8P32FupNcWaiR\r\n1BlmxL+srfBv8wh+PRDzaM5vVvKm6CkwzWKPZ8MsldYMZ3HPv3I54RHYkfx1\r\nyAKnJczRc4QmYUZVQb2xUAgVaj3T/MRxb7YUCA1ZK0te5vyj+m3FSHBJxV96\r\nkmz3V7mAFDOYWDJnSsVEhCbTQv1hEEI+qi+HZh6tAO62K+7Kn/Z7rGHMiMB+\r\ncCt6XQ9ju9XW9N38NyB2UmUFLVoufs8zBjCGLC9wPXMA88H3ijYDdLTJ9o59\r\nD8F5415i4XqtMTBPxVnBiwOkqWso5VwP15T4tSzDUUMD+enXibAdBTTj8HxJ\r\nrQhVn03up1mFzRFLyfEIlRhNU/6coNDpqnIiEsIsLy1hJrSRQrzlzxRwNzgn\r\nEAdkS3k9/ktalR7DBEzaf5P/s5afYOsPkE9t04hz/DxgZsJJYxqte09SYkD1\r\nvxOTCzZvt3oGcj1WxgCJ+NwWQDyWmWWu4/Jd+/BoZUXTFyK/GQeRSjiuOJMX\r\n1rLPdou6nMTjN/yxG4k/3Vz+4pIjXs/PMdy9TFoOF0EBTwmBmG/WzyM+9ExX\r\nGBeFQygyX7B1oE5//jJcZ8vdiVdvTGYi4eM=\r\n=2l2A\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"across-the-stars","email":"iapachecorios@protonmail.com"},"directories":{},"maintainers":[{"name":"across-the-stars","email":"iapachecorios@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-img-max_0.0.4_1673892942972_0.24253725996151054"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-16T16:45:09.854Z","0.0.1":"2023-01-16T16:45:10.095Z","modified":"2023-01-16T18:15:43.258Z","0.0.2":"2023-01-16T16:55:33.328Z","0.0.3":"2023-01-16T17:32:58.227Z","0.0.4":"2023-01-16T18:15:43.147Z"},"maintainers":[{"name":"across-the-stars","email":"iapachecorios@protonmail.com"}],"description":"Angular module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.","readme":"Package compiled for Angular 9; new versions may come up soon (no promise)\n\n# ngx-img-max\nAngular 9 and beyond module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.\n\nThis means, the huge image that the user may select will never even need to be uploaded to the server.\n\n## Demo\nA simple demo is available on stackblitz: https://stackblitz.com/edit/angular-ivy-hnhy6v\n\n## Browser support\nThis module is supported by all major browsers recent versions (IE 10+). \n\nMake sure to include the following polyfill for `HtmlCanvasElement.toBlob()`: https://www.npmjs.com/package/blueimp-canvas-to-blob\n\n```bash\n$ npm install blueimp-canvas-to-blob\n```\n\n\n\n## Install\n```bash\n$ npm install ngx-img-max\n```\n\n### Import the module\nOnly needed for Angular versions prior to 13\n```TypeScript\n// app.module.ts\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgxImgMaxModule } from 'ngx-img-max'; // <-- import the module\nimport { MyComponent } from './my.component';\n\n@NgModule({\n    imports: [BrowserModule,\n              NgxImgMaxModule // <-- include it in your app module\n             ],\n    declarations: [MyComponent],  \n    bootstrap: [MyComponent]\n})\nexport class MyAppModule {}\n```\n## Usage\n```TypeScript\nimport { NgxImgMaxService } from 'ngx-img-max';\n[...]\n    constructor(private ngxImgMaxService: NgxImgMaxService) {\n        this.ngxImgMaxService.resize([someImage], 2000, 1000).subscribe((result)=>{\n        });\n    }\n}\n```\n\n## Methods\n### Maximal filesize\n#### IMPORTANT: Catch error cases\nWhen using the compression methods you should make sure to catch the error cases. \nIf an error happens, you will receive an object with the following properties: \n `compressedFile`:`File`, `reason`: `string` and `error`:`string`\n\nPossible errors are: <br /> \n<b>`INVALID_EXTENSION`</b>: File provided is neither of type jpg nor of type png). The `compressedFile` is the original file. <br />\n<b>`PNG_WITH_ALPHA`</b>: File provided is a png image which uses the alpha channel. No compression possible unless `ignoreAlpha` is set to true. The `compressedFile` is the original file.<br />\n<b>`MAX_STEPS_EXCEEDED`</b>: Could not find the correct compression quality in 15 steps - abort. This should rarely to never at all happen. The `compressedFile` is the result of step 15 of the compression.<br />\n<b>`FILE_BIGGER_THAN_INITIAL_FILE`</b>: This should actually never happen, just a precaution. The `compressedFile` is the original file.<br />\n<b>`UNABLE_TO_COMPRESS_ENOUGH`</b>: Could not compress image enough to fit the maximal file size limit. The `compressedFile` is a compression as close as it can get.<br />\n\nExample code catch errors:\n\n ```TypeScript\nthis.ngxImgMaxService.resize([someImage], 2000, 1000).subscribe(result => {\n    //all good, result is a file\n    console.info(result);\n}, error => {\n    //something went wrong \n    //use result.compressedFile or handle specific error cases individually\n});\n```\n\n#### `compress(files: File[], maxSizeInMB: number, ignoreAlpha: boolean = false, logExecutionTime: boolean = false): Observable<any>` \nMethod to compress an image. This reduces the quality of an image down until it fits a certain fileSize which is given as `maxSizeInMB`.\nSet `ignoreAlpha` to true if you want to ignore the alpha channel for png images and compress them nonetheless (not recommended - the alpha channel will be lost and the resulting image might differ from the original image).\nReturns an observable that for every file given, onNext receives either a File when everything went as planned or an error Object if something went wrong. \n\n#### `compressImage` \nSame as above just that it takes in only one file instead of a whole array of files.\n\n### Maximal width / height\n\n#### `resize(files: File[], maxWidth: number, maxHeight: number, logExecutionTime: boolean = false): Observable<any>` \nMethod to resize files if necessary down to a certain maximal width or maximal height in px. If you want only one limit just set the other max to 10.000: for example `resize([myfile1,myfile2],2000,10000).subscribe([...]`\n\n#### `resizeImage` \nSame as above just that it takes in only one file instead of a whole array of files.\n\n### Get EXIF oriented image \n#### `getEXIFOrientedImage(image:HTMLImageElement): Promise<HTMLImageElement>`\nMethod that returns an image respecting the EXIF orientation data.\n\n\n## Limitations\nAlthough the resizing functions do use web workers to do the heavy work, this is not possible for the compression methods. The reasons for this are that a web worker does not have access to the DOM and can therefor not create a new HtmlCanvasElement. Neither can it be passed as a parameter to the web worker, as a web worker can only receive serializable data, which only be the ImageData but that can only be turned into a 2DCanvasContext, not a HtmlCanvasElement itself without the DOM. \n","readmeFilename":"README.md","homepage":"https://github.com/across-the-stars/ngx-img-max#readme","keywords":["angular","angular9","img-max","maximal","size","limit","resize"],"repository":{"type":"git","url":"git+https://github.com/across-the-stars/ngx-img-max.git"},"bugs":{"url":"https://github.com/across-the-stars/ngx-img-max/issues"}}