{"_id":"@2hats/react-native-image-tools","_rev":"4-a8589cc49daf6bfb5e39182c7b3123de","name":"@2hats/react-native-image-tools","description":"Install instructions [here](./docs/install.md).","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@2hats/react-native-image-tools","version":"1.0.0","description":"Install instructions [here](./docs/install.md).","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native"],"author":"","license":"ISC","directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/jp928/react-native-image-tools.git"},"bugs":{"url":"https://github.com/jp928/react-native-image-tools/issues"},"homepage":"https://github.com/jp928/react-native-image-tools#readme","gitHead":"64b5b1aad53fb0f26ee51c428e332bfc6f0a35d9","_id":"@2hats/react-native-image-tools@1.0.0","_npmVersion":"5.0.4","_nodeVersion":"8.1.2","_npmUser":{"name":"2hats","email":"piaojingtai@gmail.com"},"dist":{"integrity":"sha512-bCCbAErdHCpYjwemKk4Tl8bK87NvmdOfDg4eNQ6Cz9Be9s9TtNa4nIX6u74m7nvvKEOjpdRTAZKAby2/LCtEcA==","shasum":"74345348c7948db0c709a01317e473fd2bfa7786","tarball":"https://registry.npmjs.org/@2hats/react-native-image-tools/-/react-native-image-tools-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTiVh8ZzrBu0811AyAvNECbbVN/DlKdFhvrtt5HBVxQAiB+XuL1YzgesXMBE8dfwWdHT+nDOk0kBfvMliYDoYaOEw=="}]},"maintainers":[{"name":"2hats","email":"piaojingtai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-image-tools-1.0.0.tgz_1499730379694_0.48460111836902797"}},"1.0.1":{"name":"@2hats/react-native-image-tools","version":"1.0.1","description":"Install instructions [here](./docs/install.md).","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native"],"author":"","license":"ISC","directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/jp928/react-native-image-tools.git"},"bugs":{"url":"https://github.com/jp928/react-native-image-tools/issues"},"homepage":"https://github.com/jp928/react-native-image-tools#readme","gitHead":"eb48419a538a437471784ff6063ab465664dcdc6","_id":"@2hats/react-native-image-tools@1.0.1","_npmVersion":"5.0.4","_nodeVersion":"8.1.2","_npmUser":{"name":"2hats","email":"piaojingtai@gmail.com"},"dist":{"integrity":"sha512-dcuZLyarCfop0k0wvFt+8d/nsU9v+dY+k2lgmBm8/xIXGdXxMRZUtDlJgkE0xKgU1Xv60ybskZBZxMvQrqy5fw==","shasum":"f5a0329b326754d5d878474cfb5d2d784d21428f","tarball":"https://registry.npmjs.org/@2hats/react-native-image-tools/-/react-native-image-tools-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIElF7o5opyhkiiQf27FaG6sGV+7+tfw/RT0VOqpyKoCwAiEApTHnDzpTFi1sP1UxZK49JIkCc4hEYDCYix+ax4MQSTg="}]},"maintainers":[{"name":"2hats","email":"piaojingtai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-image-tools-1.0.1.tgz_1499754825929_0.40490021533332765"}},"1.0.2":{"name":"@2hats/react-native-image-tools","version":"1.0.2","description":"Install instructions [here](./docs/install.md).","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native"],"author":"","license":"ISC","directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/jp928/react-native-image-tools.git"},"bugs":{"url":"https://github.com/jp928/react-native-image-tools/issues"},"homepage":"https://github.com/jp928/react-native-image-tools#readme","gitHead":"1525989a833d140637f1c021a10b58a44bd00b00","_id":"@2hats/react-native-image-tools@1.0.2","_npmVersion":"5.0.4","_nodeVersion":"8.1.2","_npmUser":{"name":"2hats","email":"piaojingtai@gmail.com"},"dist":{"integrity":"sha512-ea6w9lRJ/+YgFcnCrrRVTXRK9bVAEA2hS3mHtG+9QSm8s4uixbIMwf4hrvqiVprStaWiCKOhetxjVJ2dtzUBeg==","shasum":"8bcc8c6f625b6d329e2071fec647a739d44da8f7","tarball":"https://registry.npmjs.org/@2hats/react-native-image-tools/-/react-native-image-tools-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9h/5+koqIvWbUCehwUd+TDR9xv9mIbzhx5HTH4hdGQQIhAMdF0tp1qInP3lhca73IGaEyVNv9j9SLH//mocO9L8RP"}]},"maintainers":[{"name":"2hats","email":"piaojingtai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-image-tools-1.0.2.tgz_1499755447133_0.4680315866135061"}},"1.0.3":{"name":"@2hats/react-native-image-tools","version":"1.0.3","description":"Install instructions [here](./docs/install.md).","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native"],"author":"","license":"ISC","directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/jp928/react-native-image-tools.git"},"bugs":{"url":"https://github.com/jp928/react-native-image-tools/issues"},"homepage":"https://github.com/jp928/react-native-image-tools#readme","gitHead":"a379b5d76b1bd49f28ccdc7f6e609e72a9795f0d","_id":"@2hats/react-native-image-tools@1.0.3","_npmVersion":"5.3.0","_nodeVersion":"7.5.0","_npmUser":{"name":"2hats","email":"piaojingtai@gmail.com"},"dist":{"integrity":"sha512-nMYblI7VXMVBths4t2qz0prF3Q6CysoEoHhqRcp3ppyjRfQpBt+gaho1CVHCsMBodO9flG5Gl0Uox2faBJKTNQ==","shasum":"2f62f2323e8adfa4a62fb7d332645a92fa0e8e5a","tarball":"https://registry.npmjs.org/@2hats/react-native-image-tools/-/react-native-image-tools-1.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzxip6rbardLLxZUyRL18z7HuvLNyKHiIwa1WKqzX/WAiBoa9T/qSP+pLUfekR5+7TTXE1Hcc7DgJhlBX0ijlHMCA=="}]},"maintainers":[{"name":"2hats","email":"piaojingtai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-image-tools-1.0.3.tgz_1502932036617_0.3683177144266665"}}},"readme":"# react-native-image-tools\n\nInstall instructions [here](./docs/install.md).\n\nAn example app is [here](https://github.com/npomfret/rn-image-tools-example).\n\n<img src=\"docs/demo.gif\" width=\"350\">\n\n## API\n\n### _RNImageTools.openEditor(options)_\n\nOpens the Adobe Image Editor.  Returns a promise which when resolved contains a uri to the output image, or null if editing was cancelled.\n\n_options_ parameter:\n\n| name | description | default value | type |\n| :---: | :---: | :---: | :--- |\n| imageUri | the input image | n/a | `string` (see below)|\n| outputFormat | the image type, must correspond to the input image type (generating PNG from JPEG or vider-vesa is not supported) | JPEG | `string` (either _'JPEG'_ or _'PNG')_ |\n| quality | representing the JPEG compression % (Ignored for PNG) | 80 | `integer` (a value between _0_ and _100_) |\n| preserveMetadata (iOS only) | copies image metadata (exif tags) from the input image to the output image | true | `boolean` |\n| saveTo | determines where the output image will be saved | photos | `string` (_'photos'_ or _'file'_) |\n\nSupported `imageUri` formats include:\n * _path_ e.g. `/foo/bar/image.jpeg`\n * _file url_ e.g. `file:///foo/bar/image.jpeg`\n * _url_ e.g. `http://foo.com/bar/image.jpeg`\n * _asset-uri_ (iOS only) e.g. `assets-library://asset/asset.JPG?id=foo&EXT=JPG`\n * _content-uri_ (android only) e.g. `content://media/external/images/foo/bar/JPEG`\n \n```javascript\n    import RNImageTools from \"react-native-image-tools\";\n\n    ...    \n\n    try {\n      const uri = await RNImageTools.openEditor({\n        imageUri,\n        outputFormat,\n        quality,\n        preserveMetadata,\n        saveTo\n      });\n    } catch (e) {\n      console.warn(\"error\", e);\n    }\n```\n\n### _RNImageTools.selectImage(options)_\n\nOpens the native image picker dialog. Returns a promise which when resolved returns an object containing the uri to the chosen image as well as some other useful information, or null if cancelled.\n\n_options_ parameter:\n\n| name | description | default value | type |\n| :---: | :---: | :---: | :--- |\n| title | optional title (android only) | n/a | `string` |\n\n```javascript\n    import RNImageTools from \"react-native-image-tools\";\n\n    ...    \n\n    try {\n      const uri = await RNImageTools.selectImage({title});\n    } catch (e) {\n      console.warn(\"error\", e);\n    }\n```\n\n### _RNImageTools.imageMetadata(imageUri)_\n\nReturns a promise which when resolved returns object containing the image metadata.\n\n```javascript\n    import RNImageTools from \"react-native-image-tools\";\n\n    ...    \n\n    try {\n      const metadata = await RNImageTools.imageMetadata(imageUri);\n    } catch (e) {\n      console.warn(\"error\", e);\n    }\n```\n\n### todo\n\n * add removeMetadata method\n * support file urls in imageData method\n * customise the tool array https://github.com/CreativeSDK/phonegap-plugin-csdk-image-editor/blob/master/src/ios/CDVImageEditor.m#L49\n * support more oof the underlying Adobe API...  ","maintainers":[{"name":"2hats","email":"piaojingtai@gmail.com"}],"time":{"modified":"2022-04-04T10:42:18.153Z","created":"2017-07-10T23:46:20.983Z","1.0.0":"2017-07-10T23:46:20.983Z","1.0.1":"2017-07-11T06:33:46.196Z","1.0.2":"2017-07-11T06:44:07.666Z","1.0.3":"2017-08-17T01:07:16.907Z"},"homepage":"https://github.com/jp928/react-native-image-tools#readme","keywords":["react-native"],"repository":{"type":"git","url":"git+https://github.com/jp928/react-native-image-tools.git"},"bugs":{"url":"https://github.com/jp928/react-native-image-tools/issues"},"license":"ISC","readmeFilename":"README.md"}