{"_id":"@autonomdev/ngx-document-scanner","_rev":"2-31de4ae3eadc8e11542940d9c4b9de5e","name":"@autonomdev/ngx-document-scanner","dist-tags":{"latest":"1.0.10"},"versions":{"1.0.9":{"name":"@autonomdev/ngx-document-scanner","version":"1.0.9","keywords":["opencv","camscanner","scanner","image processing","document","angular","OpenCVJS","image manipulation","crop"],"description":"Angular 2+ component for cropping and enhancing images of documents","author":{"name":"RoiP"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/roiperlman/ngx-document-scanner.git"},"peerDependencies":{"@angular/common":"^9.1.9","@angular/core":"^9.1.9","@angular/platform-browser":"~9.1.9","@angular/platform-browser-dynamic":"~9.1.9","rxjs":"~6.5.5"},"dependencies":{"angular2-draggable":"^2.3.2","ngx-opencv":"2.0.1","@angular/flex-layout":"^9.0.0-beta.31","@angular/material":"^9.2.4","@angular/cdk":"~9.2.4","tslib":"^1.10.0"},"main":"bundles/ngx-document-scanner.umd.js","module":"fesm5/ngx-document-scanner.js","es2015":"fesm2015/ngx-document-scanner.js","esm5":"esm5/ngx-document-scanner.js","esm2015":"esm2015/ngx-document-scanner.js","fesm5":"fesm5/ngx-document-scanner.js","fesm2015":"fesm2015/ngx-document-scanner.js","typings":"ngx-document-scanner.d.ts","metadata":"ngx-document-scanner.metadata.json","sideEffects":false,"bugs":{"url":"https://github.com/roiperlman/ngx-document-scanner/issues"},"homepage":"https://github.com/roiperlman/ngx-document-scanner#readme","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_id":"@autonomdev/ngx-document-scanner@1.0.9","_nodeVersion":"12.22.4","_npmVersion":"7.20.3","dist":{"integrity":"sha512-sTMQtOEqSbjWriqv2d4OBOtflPKn1zzMYSzby9P2r6rS449r7sfiWidZqSOu+I8fp0trZ4r/M9ympaoht3BLgA==","shasum":"a1696477368a7b33be333a3a4a2f14aa2c8f2b22","tarball":"https://registry.npmjs.org/@autonomdev/ngx-document-scanner/-/ngx-document-scanner-1.0.9.tgz","fileCount":41,"unpackedSize":1123416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE3+JCRA9TVsSAnZWagAAh7EP/2ZJJgghJ/EeE0ToVm6J\n3y4kwSlLMP11eEUDIZ2Iqr15J6plKONHTdgGLRbmzXH63cmOQk+BMPAqgNdv\n72i2BRlCJ7hdTTTZpaUWGqbAjav6jeJoo6opona7aFbgM65ZhJADj17WaPXx\nlbuBLi40L4qC7c0DXV0X3AgNXDFiqGNCyO5i3BI8KbsOquj7bHVH6/jAnoZ2\ndCUwMKolzHkDdh1/UqZEOpM3YQwqaWvdkxkIYaxQU64DYw044OYiBGZd/of4\nQ0eynPKKVTY2uK9oTQnTufeE/ex01Ot543K7rSKAIsvelBsGP5B+C8m6zoMP\n8G7o0I0SsTPiI1x2qx4mzwHYaNdhsPTjAJqV/2MSKrkDdQhPrBv/Wv1FaMPF\n6eNpL1jz6qgSnwSFd1fSI82pQZEXY/m3KzdGFoF+aTI7IqSk7DFfy3183fIP\nDleBjakAUO02Pkg+HJFYEB+xjaPoC9wLTEeJs3flPUWZjgWH6UlWM6I4O32r\n+9h4QIRkf7JDfPgPPmfEEool1mF/0xn4evx/bIUuDiabIaZSjmQA/Xax4VlH\ng+06Krc2vbz9Jb4b8AxySxtTjlqbCKjQdzyrfEeL7MBO/6SCsmKSqJLU4CJT\ng5Zibt6kyIDxODI8HRevhoBiHPh6rvfZp3XL4ABCYq/x1tVPtkg3CBtefZVY\nMlWk\r\n=a4+D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwu/laHfvzlIkqu6cI2nMKwAjNPjE/2+71cm+SGtDTdAiEAxtQ1vuQCH6tT7jDKmE2nmJVdOfK/ykHqdnHkW9SyADs="}]},"_npmUser":{"name":"elias03","email":"elias.debs03@gmail.com"},"maintainers":[{"name":"elias03","email":"elias.debs03@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-document-scanner_1.0.9_1628667784924_0.44750292712552775"},"_hasShrinkwrap":false},"1.0.10":{"name":"@autonomdev/ngx-document-scanner","version":"1.0.10","keywords":["opencv","camscanner","scanner","image processing","document","angular","OpenCVJS","image manipulation","crop"],"description":"Angular 2+ component for cropping and enhancing images of documents","author":{"name":"RoiP"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/roiperlman/ngx-document-scanner.git"},"peerDependencies":{"@angular/common":"^9.1.9","@angular/core":"^9.1.9","@angular/platform-browser":"~9.1.9","@angular/platform-browser-dynamic":"~9.1.9","rxjs":"~6.5.5"},"dependencies":{"angular2-draggable":"^2.3.2","ngx-opencv":"2.0.1","@angular/flex-layout":"^9.0.0-beta.31","@angular/material":"^9.2.4","@angular/cdk":"~9.2.4","tslib":"^1.10.0"},"bugs":{"url":"https://github.com/roiperlman/ngx-document-scanner/issues"},"homepage":"https://github.com/roiperlman/ngx-document-scanner#readme","main":"bundles/autonomdev-ngx-document-scanner.umd.js","module":"fesm5/autonomdev-ngx-document-scanner.js","es2015":"fesm2015/autonomdev-ngx-document-scanner.js","esm5":"esm5/autonomdev-ngx-document-scanner.js","esm2015":"esm2015/autonomdev-ngx-document-scanner.js","fesm5":"fesm5/autonomdev-ngx-document-scanner.js","fesm2015":"fesm2015/autonomdev-ngx-document-scanner.js","typings":"autonomdev-ngx-document-scanner.d.ts","metadata":"autonomdev-ngx-document-scanner.metadata.json","sideEffects":false,"_id":"@autonomdev/ngx-document-scanner@1.0.10","_nodeVersion":"12.22.4","_npmVersion":"7.20.3","dist":{"integrity":"sha512-TYJrsGJUzfGoHWMLBllZ+xxVLAY5FF+JbRSxkPJDZ6/Yjhd0naCwkA9QXriL4LatLQQA9qLPsMv8pj9Yg5s5Sg==","shasum":"d67f9f2fff56d75bfc3b3b7d4fd294683dd0a00c","tarball":"https://registry.npmjs.org/@autonomdev/ngx-document-scanner/-/ngx-document-scanner-1.0.10.tgz","fileCount":41,"unpackedSize":1124355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE4bOCRA9TVsSAnZWagAAkoIP/jYcYUWlNUA4EjYfDocB\nm9I3JFLxNP8NZ6m701z5EJfxgrR0MRVQgtvMtf27o5rtQJa3facY8pfwFfJm\nW/dRVQRT1LCNj04w3vqGZsgF33gClrzlt1a7+j74vikANG9cv0ots2Q7QWUn\n6wziH4rV+ffSOm2LwRh+Vnkw+fQ/tzRpU8KWl/VldJE/whrjc/eX+RpxwCRk\n2IhtCilS2v3kBpPQjtIFG0LYTiID1Fwvq1vev8KK1bVeRCIqEQ1Q5NvYgXKD\nzx1CIox01OQlzGvBB5XaAdOnduS/Yc55K2Ij7YZygTMeY9Hy8BcgRglnwbIm\nfORIWx84gEEYmjiEifhmccv0x2xBP9o46i3IOQaJhLsdEHSjJCoFAjqXbuLu\njefF/WmyfU8Sy2Bo3WGUo4ipQXuEOyPGI7Rr0n3pQGBj52bNHNym7hCsynio\n/TdGbY4qgATELn1/43IyhpVXMWK+jXxOQewcygi61D+nfM3DoZTTaj/UW4oN\nYhxFEagJTnplZ+Zv4SDLIeJ28Xr543444JW2RkgsxCGZcnK0VuVVbwcGEhjb\nd06i3H3eMZzzqMJ2585VuxvR/UJA5uWplaSNTMJhKoCsL296bhuhvgbax362\nJSARiB0sEX+bzxAKJzAUYXV5a0nf5rYyQ7u26/Ud0wuabnEPxRWisE73wwgr\nFou4\r\n=0r75\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEc36Ib4vIYz7JXfYICuBHKP7nlhEYERZDmUHYSa1YQuAiAQnASSYkL8gIWeipOSrQf7kBKUr8rze0Ry9oXsz+RSmg=="}]},"_npmUser":{"name":"elias03","email":"elias.debs03@gmail.com"},"directories":{},"maintainers":[{"name":"elias03","email":"elias.debs03@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-document-scanner_1.0.10_1628669645880_0.5442494755296226"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-11T07:43:04.865Z","1.0.9":"2021-08-11T07:43:05.111Z","modified":"2022-04-04T16:40:07.270Z","1.0.10":"2021-08-11T08:14:06.103Z"},"maintainers":[{"name":"elias03","email":"elias.debs03@gmail.com"}],"description":"Angular 2+ component for cropping and enhancing images of documents","homepage":"https://github.com/roiperlman/ngx-document-scanner#readme","keywords":["opencv","camscanner","scanner","image processing","document","angular","OpenCVJS","image manipulation","crop"],"repository":{"type":"git","url":"git+https://github.com/roiperlman/ngx-document-scanner.git"},"author":{"name":"RoiP"},"bugs":{"url":"https://github.com/roiperlman/ngx-document-scanner/issues"},"license":"MIT","readme":"# Ngx Document Scanner  \n  \nAn Angular component for cropping and enhancing images of documents, for implementation on a mobile or desktop app.  \nIt uses a [WASM](https://webassembly.org/) build of [OpenCV](https://opencv.org/) to manipulate images, to achieve near-native performance. \nNote that there are a few extra steps required to configure the component other than installing the package from npm.\n\n## Live Demo\nView a live demo **[here](https://roiperlman.github.io/ngx-document-scanner)**\n\n## Installation & Setup\ninstall the package via npm\n\n    npm install ngx-document-scanner --save\n\nthe UI is based on `@angular/material`, if you don't have it installed:\n\n    ng add @angular/material \n\nchoose 'yes' when prompted if you wish to add angular animations as it is needed for some of the components.\n\n##### Configure OpenCV \ncopy the opencv.js files to your assets folder (or any other folder). you can build the files yourself ([instructions on the OpenCV site](https://docs.opencv.org/3.4/d4/da1/tutorial_js_setup.html)), or download them from this package's [repository](https://github.com/roiperlman/ngx-document-scanner).\nboth opencv.js & opencv_js.wasm need to placed in the same folder.\n\nimport the package to your `app.module`. you'll need to configure the location of the open cv files.\n\t\n    import {OpenCVConfig} from 'ngx-document-scanner';\n    import {NgxDocumentScannerModule} from 'ngx-document-scanner';\n    \n    // set the location of the OpenCV files\n    const openCVConfig: OpenCVConfig = {\n\t  openCVDirPath: '/assets/opencv'  \n\t};\n\t\n    @NgModule({ imports: \n      [NgxDocumentScannerModule.forRoot(openCVConfig)],\n      bootstrap: [AppComponent]  \n    })\n    export class AppModule { }\n\n## Usage\n\n#### add component to template and bind to inputs and outputs.\n\n    <ngx-doc-scanner \n         *ngIf=\"image\"\n         [file]=\"image\"\n         [config]=\"config\">\n         (editResult)=\"editResult($event)\"\n         (exitEditor)=\"exitEditor($event)\"\n         (error)=\"onError($event)\"\n         (processing)=\"editorState($event)\"\n    </ngx-doc-scanner>\n\n#### set configuration options. for example:\n\n    config: DocScannerConfig = {  \n\t    editorBackgroundColor: '#fafafa', \n\t    buttonThemeColor: 'primary',  \n\t    cropToolColor: '#ff4081',  \n\t    cropToolShape: 'circle',\n\t    exportImageIcon: 'cloud_download'  \n    };\n\n## Component I\\O\n### Inputs\n\t\n|input|type|description|\n|--|--|--|\n| **file** | `File` | sets an image for editing |\n| **config** | `DocScannerConfig` | configuration object for the component. see [section](#config) dedicated to te config object. |\n\n### Outputs\n\n|output|type|description|\n|--|--|--|\n| **error** | `EventEmitter<any>` | fires on error |\n| **editResult** | `EventEmitter<Blob>` | fires when the users submits the image |\n|**exitEditor**| `EventEmitter<any>`| fires when the user exits the editor|\n|**processing**|`EventEmitter<boolean>`|fires true when the editor is prcessing or loading\\parsing the OpenCV module.\n\n\n<a id=\"config\"></a>\n## Configuration Object\noptional configuration values that can be passed to the component. \n\n    import {DocScannerConfig} form 'ngx-document-scanner'\n    config: DocScannerConfig = {\n\t    ....\n    }\n\n| property | type | description |\n|--|--|--|\n|**buttonThemeColor** | \"primary\" &#124; \"warn\" &#124; \"accent\"  | material design theme color name  for the buttons on the component|\n|**cropToolColor**|`string`|color of the crop tool (points and connecting lines)  |\n|**cropToolDimensions**  | `{width: number; height: nubmer;}`| width and height of the crop tool points|\n|**cropToolLineWeight**  |`number`|weight of the crop tool's connecting lines  |\n|**cropToolShape**|`'rect' &#124; 'circle'`|shape of the crop tool points  |\n|**editorBackgroundColor**|`string`|background color of the main editor div  |\n|**editorDimensions** | an object of css keys value pairs| css properties for the main editor div  |\n|**exportImageIcon**  |`string`| icon for the button that completes the editing and emits the edited image.|\n**extraCss**|an object of css keys value pairs|css that will be added to the main div of the editor component |\n|**maxImageDimensions**  | `{width: number; height: nubmer;}` | max dimensions of oputput image. if set to zero will not resize the image.|\n|**maxPreviewWidth**  | `number`|max width of the preview pane|\n\n## Ngx-OpenCV\nThe angular service used to load the open cv library and monitor it's state is also available as a standalone package: [NgxOpenCV](https://www.npmjs.com/ngx-opencv)\n\n## License  \n  \nThis project is licensed under the MIT License.\n\n","readmeFilename":"README.md"}