{"_id":"@beesbuild-libs/exif-js","_rev":"1-1bce432844e3c0ad7de42f6129563f4a","name":"@beesbuild-libs/exif-js","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.0":{"name":"@beesbuild-libs/exif-js","version":"0.0.0","keywords":["exif"],"license":"MIT","_id":"@beesbuild-libs/exif-js@0.0.0","maintainers":[{"name":"beesbuild-fe","email":"beesbuild-fe@freshgood.cn"}],"homepage":"https://github.com/exif-js/exif-js","dist":{"shasum":"9b401e11e4e0786fdde4312975e38621f4084f53","tarball":"https://registry.npmjs.org/@beesbuild-libs/exif-js/-/exif-js-0.0.0.tgz","fileCount":15,"integrity":"sha512-HOvvgP90B1ppd3sCFMtYZTLPdNX7ixOqBUjI74wiAhJD13kCQ1L9Sxx0NJY9vK3rZ6d8MbAjpRNQ7C7zfyksxw==","signatures":[{"sig":"MEYCIQCmcax0P7mrJNfqqr4zwVVIKTsmF/6yS716zhutqyh82wIhANKPABEHbQZlu3Aprj5cZJ8mRNzrhGojb5dlKW1JbIXt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1419941},"main":"exif.js","_from":"file:beesbuild-libs-exif-js-0.0.0.tgz","types":"exif.d.ts","ignore":["**/.*","node_modules","bower_components","test","tests","spec","example"],"scripts":{"libs:publish":"beesbuild publish --preReleaseId=beta"},"_npmUser":{"name":"beesbuild-fe","email":"beesbuild-fe@freshgood.cn"},"_resolved":"/private/var/folders/4h/mlgh1tcs7xb2hxb1cp9fn4t00000gn/T/2224a3935cf140fe64f8fcca73ac33c1/beesbuild-libs-exif-js-0.0.0.tgz","_integrity":"sha512-HOvvgP90B1ppd3sCFMtYZTLPdNX7ixOqBUjI74wiAhJD13kCQ1L9Sxx0NJY9vK3rZ6d8MbAjpRNQ7C7zfyksxw==","_npmVersion":"10.2.3","description":"JavaScript library for reading EXIF image metadata","directories":{"example":"example"},"_nodeVersion":"20.10.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"bower":"^1.4.2","mversion":"^1.10.0","beesbuild":"^0.0.18","@beesbuild-libs/eslint-config-vue3":"^0.0.5"},"_npmOperationalInternal":{"tmp":"tmp/exif-js_0.0.0_1730086704087_0.07757927938516707","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@beesbuild-libs/exif-js","version":"0.1.0","description":"JavaScript library for reading EXIF image metadata","main":"exif.js","types":"exif.d.ts","directories":{"example":"example"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"keywords":["exif"],"maintainers":[{"name":"beesbuild-fe","email":"beesbuild-fe@freshgood.cn"}],"license":"MIT","homepage":"https://github.com/exif-js/exif-js","ignore":["**/.*","node_modules","bower_components","test","tests","spec","example"],"devDependencies":{"@beesbuild-libs/eslint-config-vue3":"^0.1.0","beesbuild":"^0.1.0","bower":"^1.4.2","mversion":"^1.10.0"},"scripts":{"libs:publish":"beesbuild publish --preReleaseId=beta"},"_id":"@beesbuild-libs/exif-js@0.1.0","_integrity":"sha512-heg9ZWaaIghgFbvmiR+7OEt2AMqNEmthzN24oJG7x5Hsjr1KQL6N1N7xIsD2V38Q2/vwvyE2whkAZ7LTS4/Mag==","_resolved":"/private/var/folders/4h/mlgh1tcs7xb2hxb1cp9fn4t00000gn/T/aabc8d09fd45ddf82abb57d5b43f3265/beesbuild-libs-exif-js-0.1.0.tgz","_from":"file:beesbuild-libs-exif-js-0.1.0.tgz","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-heg9ZWaaIghgFbvmiR+7OEt2AMqNEmthzN24oJG7x5Hsjr1KQL6N1N7xIsD2V38Q2/vwvyE2whkAZ7LTS4/Mag==","shasum":"70fa1ad512b687487993ffd1a08b466b2c6f7ae4","tarball":"https://registry.npmjs.org/@beesbuild-libs/exif-js/-/exif-js-0.1.0.tgz","fileCount":15,"unpackedSize":1419940,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+syAx5SqEVgaMNCk6kbMScRTptQttAT5YEmqYlvSvSAiB+Rw4drkLAUdh0RHT2753ndxntUgtNSk63JnjkEb/0Zw=="}]},"_npmUser":{"name":"beesbuild-fe","email":"beesbuild-fe@freshgood.cn"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exif-js_0.1.0_1730096245195_0.41121488162357966"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-28T03:38:23.920Z","modified":"2024-10-28T06:17:25.665Z","0.0.0":"2024-10-28T03:38:24.335Z","0.1.0":"2024-10-28T06:17:25.479Z"},"license":"MIT","homepage":"https://github.com/exif-js/exif-js","keywords":["exif"],"description":"JavaScript library for reading EXIF image metadata","maintainers":[{"name":"beesbuild-fe","email":"beesbuild-fe@freshgood.cn"}],"readme":"# Exif.js\n\nA JavaScript library for reading [EXIF meta data](https://en.wikipedia.org/wiki/Exchangeable_image_file_format) from image files.\n\nYou can use it on images in the browser, either from an image or a file input element. Both EXIF and IPTC metadata are retrieved.\nThis package can also be used in AMD or CommonJS environments.\n\n**Note**: The EXIF standard applies only to `.jpg` and `.tiff` images. EXIF logic in this package is based on the EXIF standard v2.2 ([JEITA CP-3451, included in this repo](/spec/Exif2-2.pdf)).\n\n## Install\nInstall `exif-js` through [NPM](https://www.npmjs.com/#getting-started):\n\n    npm install exif-js --save    \n\nOr [Bower](http://bower.io/):\n\n    bower install exif-js --save\n\nThen add a `script` tag in your an HTML in the [best position](http://stackoverflow.com/questions/436411/where-is-the-best-place-to-put-script-tags-in-html-markup) referencing your local file.\n\n```html\n<script src=\"vendors/exif-js/exif-js\"></script>\n```\n\nYou can also use a minified version hosted on jsDelivr\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/exif-js\"></script>\n```\n\n## Usage\nThe package adds a global `EXIF` variable (or AMD or CommonJS equivalent).\n\nStart with calling the `EXIF.getData` function. You pass it an image as a parameter:\n- either an image from a `<img src=\"image.jpg\">`\n- OR a user selected image in a `<input type=\"file\">` element on your page.\n\nAs a second parameter you specify a callback function. In the callback function you should use `this` to access the image with the aforementioned metadata you can then use as you want.\nThat image now has an extra `exifdata` property which is a Javascript object with the EXIF metadata. You can access it's properties to get data like the *image caption*, the *date a photo was taken* or it's *orientation*.\n\nYou can get all tages with `EXIF.getTag`. Or get a single tag with `EXIF.getTag`, where you specify the tag as the second parameter.\nThe tag names to use are listed in `EXIF.Tags` in `exif.js`.\n\n**Important**: Note that you have to wait for the image to be completely loaded, before calling `getData` or any other function. It will silently fail otherwise.\nYou can implement this wait, by running your exif-extracting logic on the `window.onLoad` function. Or on an image's own `onLoad` function.\nFor jQuery users please note that you can NOT (reliably) use jQuery's `ready` event for this. Because it fires before images are loaded.\nYou could use $(window).load() instead of $(document.ready() (please note that `exif-js has NO dependency on jQuery or any other external library). \n \n**JavaScript**:\n```javascript\nwindow.onload=getExif;\n\nfunction getExif() {\n    var img1 = document.getElementById(\"img1\");\n    EXIF.getData(img1, function() {\n        var make = EXIF.getTag(this, \"Make\");\n        var model = EXIF.getTag(this, \"Model\");\n        var makeAndModel = document.getElementById(\"makeAndModel\");\n        makeAndModel.innerHTML = `${make} ${model}`;\n    });\n\n    var img2 = document.getElementById(\"img2\");\n    EXIF.getData(img2, function() {\n        var allMetaData = EXIF.getAllTags(this);\n        var allMetaDataSpan = document.getElementById(\"allMetaDataSpan\");\n        allMetaDataSpan.innerHTML = JSON.stringify(allMetaData, null, \"\\t\");\n    });\n}\n```\n\n**HTML**:\n```html\n<img src=\"image1.jpg\" id=\"img1\" />\n<pre>Make and model: <span id=\"makeAndModel\"></span></pre>\n<br/>\n<img src=\"image2.jpg\" id=\"img2\" />\n<pre id=\"allMetaDataSpan\"></pre>\n<br/>\n```\n\nNote there are also alternate tags, such the `EXIF.TiffTags`. See the source code for the full definition and use.\nYou can also get back a string with all the EXIF information in the image pretty printed by using `EXIF.pretty`.\nCheck the included [index.html](/exif-js/exif-js/blob/master/index.html).\n\n**XMP**\nSince issue #53 was merged also extracting of XMP data is supported. To not slow down this is optional, and you need to call `EXIF.enableXmp();` before using `EXIF.getData()`.\n\nPlease refer to the [source code](exif.js) for more advanced usages such as getting image data from a [File/Blob](https://developer.mozilla.org/en/docs/Web/API/Blob) object (`EXIF.readFromBinaryFile`).\n\n## Contributions\nThis is an [open source project](LICENSE.md). Please contribute by forking this repo and issueing a pull request. The project has had notable contributions already, like reading ITPC data.\n\nYou can also contribute by [filing bugs or new features please issue](/exif-js/issues).\nOr improve the documentation. Please update this README when you do a pull request of proposed changes in base functionality.\n","readmeFilename":"README.md"}