Giter Site home page Giter Site logo

niubility000 / angular-fix-image-orientation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from czarpino/angular-fix-image-orientation

0.0 0.0 0.0 136 KB

Fix image orientation by reading image exif data and applying appropriate CSS transformations.

License: MIT License

angular-fix-image-orientation's Introduction

Angular Fix Image Orientation Directive

Fix image orientation by reading image exif data and applying appropriate CSS transformations. This is, however, just a visual fix.

Usage

<img img-fix-orientation="imageUrl" ng-src="{{ imageUrl }}">

Note: Currently, only URL and data-url (i.e. data:image/jpeg...) image sources are accepted. Feel free to send PRs to support more image sources.

Installation

You can install via Bower, downloading the source, or outright copy-pasting. For the latter 2, you'll also have to manually install EXIF-JS. The preferred way to install, however, is with Bower:

bower install czarpino/angular-fix-image-orientation --save

Include js file in your HTML below AngularJS and EXIF-JS (yes, also include exif.js):

<script src="path/to/exif-js/exif.js"></script>
<script src="path/to/angular/angular.js"></script>
<script src="path/to/angular-fix-image-orientation/angular-fix-image-orientation.js"></script>

And don't forget to include as module dependency:

angular.module("appModule", ['cp.ng.fix-image-orientation']);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.