Giter Club home page Giter Club logo

mr-image's People

Contributors

marcindr avatar maxiruani avatar rboehme avatar talzag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mr-image's Issues

Can we give image source dynamically?

I need to draw a canvas after user uploads the picture. So i have to give image on run time. The following code is not working

$scope.image = { src: $scope.file, maxWidth: 938 };

Can somebody help me out on this?

crop proportional image?

so, in my work i need crop proportional image, do you have a example using mr image for this?

JPG output?

Is it possible to have the base64 cropped image in jpg encoding?

Bug: selector.crop() doesn't update if image is changed.

Markup:

<button ng-click="toggle()">Toggle image</button>
<button ng-click="crop()">Crop</button>
<div mr-image mr-max-width="600" mr-src="img.src" mr-selector="selector"></div>

Controller:

$scope.selector = {};
$scope.img = {src: "foo/bar.jpg"}

$scope.crop = function() {
    $scope.cropped = $scope.selector.crop();
    console.log($scope.cropped);
}

$scope.toggle = function() {
    $scope.img.src = "foo/baz.jpg"
}

Steps to reproduce:

  1. crop image 1
  2. save the base64 output from the console
  3. click toggle, so that image is switched (display updates properly)
  4. crop image 2
  5. save the base64 output from the console
  6. generate the images from the given base64 encodings (use this converter for example)

You'll see that the 2nd crop is from the image 1.

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.