quark-exif-js
v1.0.2
Published
JavaScript library for reading EXIF image metadata
Downloads
11
Readme
Exif.js
A JavaScript library for reading EXIF meta data from image files.
You can use it on images in the browser, either from an image or a file input element. Both EXIF and IPTC metadata are retrieved. This package can also be used in AMD or CommonJS environments.
quark-exif-js
NPM package based on Exif.js
encapsulation, providing hooks
method invocation for obtaining photo Exif information in JavaScript
Installation
npm install quark-exif-js
API
const { getExifImage } = useExifInfo();
getExifImage(file, (res:any)=>{
if(res && res.success && res?.data)
console.log("exifDtata", res?.data);
})
Example
import { useExifInfo } from 'quark-exif-js';
export default function App() {
const { getExifImage } = useExifInfo();
const handleChange = (e: any) => {
const file = e?.target?.files[0]
getExifImage(file, (res:any)=>{
if(res && res.success && res?.data)
console.log("exifDtata", res?.data);
})
}
return (
<div>
<input
type="file"
id="file"
accept=".jpg, .png, .heif, .heic"
onChange={handleChange}
/>
</div>
);
}