Gathering detailed insights and metrics for @innei/piexif-ts
Gathering detailed insights and metrics for @innei/piexif-ts
Gathering detailed insights and metrics for @innei/piexif-ts
Gathering detailed insights and metrics for @innei/piexif-ts
Read and modify exif in client-side or server-side JavaScript.
npm install @innei/piexif-ts
Typescript
Module System
Node Version
NPM Version
TypeScript (87.55%)
JavaScript (12.45%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
16 Stars
320 Commits
8 Forks
2 Watchers
4 Branches
1 Contributors
Updated on Apr 28, 2025
Latest Version
2.1.2
Package Id
@innei/piexif-ts@2.1.2
Unpacked Size
699.05 kB
Size
113.48 kB
File Count
16
NPM Version
10.2.4
Node Version
22.15.0
Published on
Jun 11, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This repository is forked from piexifjs and all praise should go to the creator of this great library.
Fix of the Typescript version of the original piexifjs as I was having trouble using it. See original documentation for how to use it.
npm i piexif-ts
It's very similar to the javascript library, but with some slight differences. Below is an example of how you can use this:
1import piexif, { IExif, IExifElement, TagValues } from 'piexif-ts'; 2 3var file = evt.target.files[0]; 4 5var zeroth: IExifElement = {}; 6var exif: IExifElement = {}; 7var gps: IExifElement = {}; 8zeroth[TagValues.ImageIFD.Make] = "Make"; 9zeroth[TagValues.ImageIFD.XResolution] = [777, 1]; 10zeroth[TagValues.ImageIFD.YResolution] = [777, 1]; 11zeroth[TagValues.ImageIFD.Software] = "Piexifjs"; 12exif[TagValues.ExifIFD.DateTimeOriginal] = "2010:10:10 10:10:10"; 13exif[TagValues.ExifIFD.LensMake] = "LensMake"; 14exif[TagValues.ExifIFD.Sharpness] = 777; 15exif[TagValues.ExifIFD.LensSpecification] = [[1, 1], [1, 1], [1, 1], [1, 1]]; 16gps[TagValues.GPSIFD.GPSVersionID] = [7, 7, 7, 7]; 17gps[TagValues.GPSIFD.GPSDateStamp] = "1999:99:99 99:99:99"; 18var exifObj: IExif = {"0th":zeroth, "Exif":exif, "GPS":gps}; 19var exifStr = piexif.dump(exifObj); 20 21var reader = new FileReader(); 22reader.onload = function(e) { 23 var inserted = piexif.insert(exifStr, e.target.result); 24 25 var image = new Image(); 26 image.src = inserted; 27 image.width = 200; 28 var el = $("<div></div>").append(image); 29 $("#resized").prepend(el); 30 31}; 32reader.readAsDataURL(file);
Note also that in tsconfig.json
the following setting needs to be set to commonjs
for some reason. I am not sure why, so if someone could explain me, please do.
1{ 2... 3 "compilerOptions": { 4 "module": "commonjs", 5 ... 6 } 7}
No dependency. Piexifjs just needs standard JavaScript environment.
Both client-side and server-side. Piexifjs is transpiled as Universal Module Definition(https://github.com/umdjs/umd).
Give me details. Environment, code, input, output. I can do nothing with abstract.
This software is released under the MIT License, see LICENSE.txt.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More