1.0.2 • Published 1 year ago

quark-exif-js v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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>
  );
}
1.0.2

1 year ago

1.0.1

1 year ago