GithubHelp home page GithubHelp logo

isabella232 / cordova-plugin-image-resizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zimmo-be/cordova-plugin-image-resizer

0.0 0.0 0.0 72 KB

License: MIT License

Java 45.67% Objective-C 31.17% JavaScript 23.16%

cordova-plugin-image-resizer's Introduction

Image Resizer for Cordova

By: Protonet GmbH

Authors: Joschka Schulz

Adding the Plugin

Use the Cordova CLI and type in the following command:

cordova plugin add https://github.com/protonet/cordova-plugin-image-resizer.git

Sample Code

At the moment the plugin is available on android, iOS and windows

resize

window.ImageResizer.resize(options, success, failed);

Options

  • uri(String): The Uri for the image on the device to get scaled
  • folderName(String): The name of the folder the image should be put in android only
  • fileName(String): A custom name for the file. Default name is a timestamp. android and windows only
  • quality(Number): Quality given as Number for the quality of the new image android and iOS only
  • width(Number): The width of the new image,
  • height(Number): The height of the new image

Android Example

var options = {
      uri: uri,
      folderName: "Protonet Messenger",
      quality: 90,
      width: 1280,
      height: 1280};

window.ImageResizer.resize(options,
  function(image) {
     // success: image is the new resized image
  }, function() {
    // failed: grumpy cat likes this function
  });

cordova-plugin-image-resizer's People

Contributors

ben3005 avatar bochetatron avatar cosemansp avatar daviddk avatar grafikart avatar joschkaschulz avatar karvapallo avatar kurudinov avatar michaeleeztradercom avatar snirs90 avatar sybeck2k avatar tiff avatar webberig avatar

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.