All Projects → hMatoba → Piexifjs

hMatoba / Piexifjs

Licence: mit
Read and modify exif in client-side or server-side JavaScript.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Piexifjs

google-photos-exif
A tool to populate missing `DateTimeOriginal` EXIF metadata in Google Photos takeout, using Google's JSON metadata.
Stars: ✭ 288 (-21.53%)
Mutual labels:  exif
exif-loader
Extract EXIF- & IPTC-data from your JPGs during build-time.
Stars: ✭ 14 (-96.19%)
Mutual labels:  exif
Photo Exif Toolkit
Photo Exif Toolkit Android app entirely written using Kotlin language
Stars: ✭ 37 (-89.92%)
Mutual labels:  exif
geotagging
Photography geotagging tool
Stars: ✭ 17 (-95.37%)
Mutual labels:  exif
go-xmp
A native Go SDK for the Extensible Metadata Platform (XMP)
Stars: ✭ 36 (-90.19%)
Mutual labels:  exif
librephotos-frontend
A self-hosted open source photo management service. This is the repository of the frontend.
Stars: ✭ 19 (-94.82%)
Mutual labels:  exif
pigallery
PiGallery: AI-powered Self-hosted Secure Multi-user Image Gallery and Detailed Image analysis using Machine Learning, EXIF Parsing and Geo Tagging
Stars: ✭ 35 (-90.46%)
Mutual labels:  exif
Exifcleaner
Cross-platform desktop GUI app to clean image metadata
Stars: ✭ 305 (-16.89%)
Mutual labels:  exif
mediapool exif
Holt beim Upload die EXIF-Daten aus dem Bild und setzt diese als Metadaten in die Datenbank ein.
Stars: ✭ 27 (-92.64%)
Mutual labels:  exif
ImageOrientationFix
PHP library to fix image orientation by exif data.
Stars: ✭ 15 (-95.91%)
Mutual labels:  exif
ragamints
Download Instagram photos while preserving caption and geolocation as EXIF, IPTC, and XMP fields
Stars: ✭ 17 (-95.37%)
Mutual labels:  exif
hsexif
Exif parser in pure haskell
Stars: ✭ 18 (-95.1%)
Mutual labels:  exif
react-exif-orientation-img
NOT MAINTAINED ANYMORE - img element wrapper component for React that understands EXIF orientation information and corrects it using CSS transforms.
Stars: ✭ 24 (-93.46%)
Mutual labels:  exif
Photini
An easy to use digital photograph metadata (Exif, IPTC, XMP) editing application.
Stars: ✭ 113 (-69.21%)
Mutual labels:  exif
Exifer
A lightweight Exif meta-data decipher.
Stars: ✭ 290 (-20.98%)
Mutual labels:  exif
imageorient
Go image decoding with respect to the EXIF orientation tag
Stars: ✭ 62 (-83.11%)
Mutual labels:  exif
librephotos
A self-hosted open source photo management service. This is the repository of the backend.
Stars: ✭ 3,827 (+942.78%)
Mutual labels:  exif
Magicalcamera
A library to take picture easy, transform your data in different format and save photos in your device
Stars: ✭ 327 (-10.9%)
Mutual labels:  exif
Piexif
Exif manipulation with pure python script.
Stars: ✭ 290 (-20.98%)
Mutual labels:  exif
dartexif
Dart package to decode Exif data from tiff, jpeg and heic files
Stars: ✭ 16 (-95.64%)
Mutual labels:  exif

Piexifjs

.. image:: https://travis-ci.org/hMatoba/piexifjs.svg?branch=master :target: https://travis-ci.org/hMatoba/piexifjs .. image:: https://badge.fury.io/js/piexifjs.svg :target: http://badge.fury.io/js/piexifjs

Read and modify exif. Library to modify exif in JS(both client-side and Node.js). http://piexifjs.readthedocs.org/en/latest/index.html

Notice and Warning!

We are implementing v2.0. This version would include a few big changes. If you won't ready to use, don't update this library.

npm install [email protected]

Thank you for using piexifjs!

How to Use

  • :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".
  • :code:var exifStr = piexif.dump(exifObj) - Get exif as string to insert into JPEG.
  • :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.
  • :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.

Use with File API or Canvas API.

Example

.. code:: html

<input type="file" id="files" />
<script src="/js/piexif.js" />
<script>
function handleFileSelect(evt) {
    var file = evt.target.files[0];
    
    var zeroth = {};
    var exif = {};
    var gps = {};
    zeroth[piexif.ImageIFD.Make] = "Make";
    zeroth[piexif.ImageIFD.XResolution] = [777, 1];
    zeroth[piexif.ImageIFD.YResolution] = [777, 1];
    zeroth[piexif.ImageIFD.Software] = "Piexifjs";
    exif[piexif.ExifIFD.DateTimeOriginal] = "2010:10:10 10:10:10";
    exif[piexif.ExifIFD.LensMake] = "LensMake";
    exif[piexif.ExifIFD.Sharpness] = 777;
    exif[piexif.ExifIFD.LensSpecification] = [[1, 1], [1, 1], [1, 1], [1, 1]];
    gps[piexif.GPSIFD.GPSVersionID] = [7, 7, 7, 7];
    gps[piexif.GPSIFD.GPSDateStamp] = "1999:99:99 99:99:99";
    var exifObj = {"0th":zeroth, "Exif":exif, "GPS":gps};
    var exifStr = piexif.dump(exifObj);

    var reader = new FileReader();
    reader.onload = function(e) {
        var inserted = piexif.insert(exifStr, e.target.result);

        var image = new Image();
        image.src = inserted;
        image.width = 200;
        var el = $("<div></div>").append(image);
        $("#resized").prepend(el);

    };
    reader.readAsDataURL(file);
}

document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>

Dependency

No dependency. Piexifjs just needs standard JavaScript environment.

Environment

Both client-side and server-side. Standard browsers(Tested on IE11, Opera28, and PhantomJS) and Node.js.

Issues

Give me details. Environment, code, input, output. I can do nothing with abstract.

License

This software is released under the MIT License, see LICENSE.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].