{"id":22486102,"url":"https://github.com/hMatoba/piexifjs","last_synced_at":"2025-08-02T19:30:47.013Z","repository":{"id":28866548,"uuid":"32390736","full_name":"hMatoba/piexifjs","owner":"hMatoba","description":"Read and modify exif in client-side or server-side JavaScript.","archived":false,"fork":false,"pushed_at":"2021-07-13T16:24:32.000Z","size":783,"stargazers_count":595,"open_issues_count":21,"forks_count":121,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-07-23T07:24:11.506Z","etag":null,"topics":["exif","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hMatoba.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-17T12:00:28.000Z","updated_at":"2025-07-21T01:30:40.000Z","dependencies_parsed_at":"2022-06-26T10:03:33.699Z","dependency_job_id":null,"html_url":"https://github.com/hMatoba/piexifjs","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/hMatoba/piexifjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hMatoba%2Fpiexifjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hMatoba%2Fpiexifjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hMatoba%2Fpiexifjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hMatoba%2Fpiexifjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hMatoba","download_url":"https://codeload.github.com/hMatoba/piexifjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hMatoba%2Fpiexifjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268440163,"owners_count":24250737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exif","javascript"],"created_at":"2024-12-06T17:13:54.298Z","updated_at":"2025-08-02T19:30:46.726Z","avatar_url":"https://github.com/hMatoba.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Libraries Used"],"sub_categories":[],"readme":"Piexifjs\n========\n\n.. image:: https://travis-ci.org/hMatoba/piexifjs.svg?branch=master\n    :target: https://travis-ci.org/hMatoba/piexifjs\n.. image:: https://badge.fury.io/js/piexifjs.svg\n    :target: http://badge.fury.io/js/piexifjs\n\nRead and modify exif. Library to modify exif in JS(both client-side and Node.js).\nhttp://piexifjs.readthedocs.org/en/latest/index.html\n\nNotice and Warning!\n-------------------\n\nWe are implementing v2.0. This version would include a few big changes. If you won't ready to use, don't update this library.\n \n```\nnpm install piexifjs@1.0.4\n```\n \nThank you for using piexifjs!\n\n\nHow to Use\n----------\n\n- :code:`var exifObj = piexif.load(jpegData)` - Get exif data as *object*. *jpegData* must be a *string* that starts with \"\\data:image/jpeg;base64,\"(DataURL), \"\\\\xff\\\\xd8\", or \"Exif\".\n- :code:`var exifStr = piexif.dump(exifObj)` - Get exif as *string* to insert into JPEG.\n- :code:`piexif.insert(exifStr, jpegData)` - Insert exif into JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.\n- :code:`piexif.remove(jpegData)` - Remove exif from JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.\n\nUse with File API or Canvas API.\n\nExample\n-------\n\n.. code:: html\n\n    \u003cinput type=\"file\" id=\"files\" /\u003e\n    \u003cscript src=\"/js/piexif.js\" /\u003e\n    \u003cscript\u003e\n    function handleFileSelect(evt) {\n        var file = evt.target.files[0];\n        \n        var zeroth = {};\n        var exif = {};\n        var gps = {};\n        zeroth[piexif.ImageIFD.Make] = \"Make\";\n        zeroth[piexif.ImageIFD.XResolution] = [777, 1];\n        zeroth[piexif.ImageIFD.YResolution] = [777, 1];\n        zeroth[piexif.ImageIFD.Software] = \"Piexifjs\";\n        exif[piexif.ExifIFD.DateTimeOriginal] = \"2010:10:10 10:10:10\";\n        exif[piexif.ExifIFD.LensMake] = \"LensMake\";\n        exif[piexif.ExifIFD.Sharpness] = 777;\n        exif[piexif.ExifIFD.LensSpecification] = [[1, 1], [1, 1], [1, 1], [1, 1]];\n        gps[piexif.GPSIFD.GPSVersionID] = [7, 7, 7, 7];\n        gps[piexif.GPSIFD.GPSDateStamp] = \"1999:99:99 99:99:99\";\n        var exifObj = {\"0th\":zeroth, \"Exif\":exif, \"GPS\":gps};\n        var exifStr = piexif.dump(exifObj);\n\n        var reader = new FileReader();\n        reader.onload = function(e) {\n            var inserted = piexif.insert(exifStr, e.target.result);\n\n            var image = new Image();\n            image.src = inserted;\n            image.width = 200;\n            var el = $(\"\u003cdiv\u003e\u003c/div\u003e\").append(image);\n            $(\"#resized\").prepend(el);\n\n        };\n        reader.readAsDataURL(file);\n    }\n    \n    document.getElementById('files').addEventListener('change', handleFileSelect, false);\n    \u003c/script\u003e\n\nDependency\n----------\n\nNo dependency. Piexifjs just needs standard JavaScript environment.\n\nEnvironment\n-----------\n\nBoth client-side and server-side. Standard browsers(Tested on IE11, Opera28, and PhantomJS) and Node.js.\n\nIssues\n------\n\nGive me details. Environment, code, input, output. I can do nothing with abstract.\n\nLicense\n-------\n\nThis software is released under the MIT License, see LICENSE.txt.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FhMatoba%2Fpiexifjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FhMatoba%2Fpiexifjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FhMatoba%2Fpiexifjs/lists"}