Giter VIP home page Giter VIP logo

cordova-plugin-imagepicker's Introduction

cordova-plugin-ImagePicker

非常感谢南尘banchichen 提供的源码支持

一个支持多选,相册实现了拍照、预览、(android 图片压缩)等功能

2.功能和参数含义

温馨提示:目前库中的预览界面有个原图的复选框,暂时只做了UI,还没有做压缩的逻辑

配置参数 参数含义
selectLimit 多选限制数量,默认为9
width 设置图片的width,默认为720
height 设置图片的height,默认为960
quality 图片质量 默认100

##安装要求

  • Cordova Version >=5.0
  • Cordova-Android >=4.0
  • Cordova-iOS >=6.0

##ios Requirements 要求

OS 6 or later. Requires ARC iOS6及以上系统可使用. ARC环境.

When system version is iOS6 or iOS7, Using AssetsLibrary. When system version is iOS8 or later, Using PhotoKit. 如果运行在iOS6或7系统上,用的是AssetsLibrary库获取照片资源。 如果运行在iOS8及以上系统上,用的是PhotoKit库获取照片资源。

##安装

  1. 命令行运行 cordova plugin add https://github.com/giantss/cordova-plugin-ImagePicker.git
  2. 命令行运行 cordova build --device

##注意事项

  1. 这个插件要求cordova-android 的版本 >=4.0,推荐使用 cordova 5.0.0 或更高的版本,因为从cordova 5.0 开始cordova-android 4.0 是默认使用的android版本
  2. 请在cordova的deviceready事件触发以后再调用本插件!!!

android 演示

ios效果图

##使用方式

ImagePicker.getPictures(function(result) {
    alert(result);
}, function(err) {
    alert(err);
}, { max : 9, width : 720, height : 960, quality : 100 });

cordova-plugin-imagepicker's People

Contributors

giantss avatar

Watchers

 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.