Code Monkey home page Code Monkey logo

alloyclip's Introduction

AlloyClip

##DEMO PAGE ###查看使用DEMO

##description

A PC & Mobile Image Clip Kit based on AlloyImage

基于AlloyImage的图片裁切组件

##为什么使用AlloyClip 基于移动互联网的Web页面越来越多,与此同时,用户获取图像的成本也越来越低,裁剪、进一步修修饰图像的需求也越来越多。 本着Don't Repeat Yourself的原则,AlloyClip是基于AlloyImage图像处理库的图像裁剪组件,将适配大多数的开发需求,做到嵌入即可用的开发模式,避免相似场景重复开发的局面出现,同时使AlloyImage基础技术服务于业务需求。

文档

###0.0.1

###$AC或AlloyClip 构造方法 初始化AlloyClip对象
new $AC(String Selector, Number width, Number height, Number Style);
{Selector} DOM选择器
{width} 要裁剪到宽度
{height} 要裁剪的高度
{Style} 使用的样式 0是不固定选择框,1是固定选择框
返回 AlloyClip对象

###AlloyClip对象的方法

###ok 点击确定按钮进行的方法注册
ok(Function callback)
{callback} 回调函数,有两个参数分别为base64, AIObj
base64为裁剪好的图片base64字符串
AIObj为裁剪好的图片AlloyImage对象

示例

new $AC(".t", 200, 100, 1).ok(function(base64, AIObj){
        //upload base64

        //or use AlloyImage processing image
        AIObj.ps("lomo").download("AIpsed.jpg", 0.6);
});

Licence

Released under GPLv3

© 2013-2014 Alloyteam.

alloyclip's People

Contributors

biqing avatar honghu91 avatar

Watchers

 avatar  avatar  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.