0.3.2 • Published 5 years ago

rotation-css v0.3.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

RotationCSS

This npm package parses the exif data of a jpeg file and returns a hash that has the necessary CSS to rotate the image correctly.

  import rotationCSS from 'rotation-css';

  const inputElement = document.querySelector("input")
  const imageElement = document.querySelector("img")

  const reader = new FileReader();
  reader.onload = function(event) {
    imageElement.src = event.target.result;
    imageElement.style = rotationCSS(event.target.result);
  };
  reader.readAsDataURL(inputElement.files[0]);

This package uses code based on Exif.js to extract the actual metadata.

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago