Daycaca

A pure JavaScript library to handle image via canvas

Install Now

How To Use

Browser

<script src="./dist/daycaca.min.js"></script>

Npm

$ npm install daycaca --save

In your JS File

daycaca.setConfig({});

view more details


Examples

Base64

daycaca.base64('./images/test-base64.png', () => {
  //...
});

compress

before

daycaca.base64('./images/test-compress.jpg', 10, () => {
  //...
});

Crop

裁剪前

daycaca.crop('./images/test-compress.jpg', {
  x: 20,
  y: 20,
  w: 120,
  h: 60
  }, () => {
//...
});

Rotate

before

daycaca.rotate(el, 90, () => {
//...
});



The Project Made ❤️ by Jack Pu