# pictool **Repository Path**: chenshenhai/pictool ## Basic Information - **Project Name**: pictool - **Description**: A front-end image processing gadget - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-02-18 - **Last Updated**: 2021-05-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Pictool ## A front-end image processing gadget [![Build Status](https://travis-ci.com/chenshenhai/pictool.svg?branch=master)](https://travis-ci.com/chenshenhai/pictool) [![npm-version](https://img.shields.io/npm/l/pictool.svg)](./LICENSE) [![](https://img.shields.io/npm/v/pictool.svg)](https://www.npmjs.com/package/pictool) ![pictool-logo](https://user-images.githubusercontent.com/8216630/61581603-28ffd180-ab53-11e9-9461-a24d31643ec7.png) > Examples of online use [https://chenshenhai.github.io/pictool/example/module/pictool-ui.html](https://chenshenhai.github.io/pictool/example/module/pictool-ui.html) ## Installation ### Prerequisites - Operating System: Windows,macOS,Linux - Node.js Runtime: `12.3+` ### NPM Usage ```sh npm i --save pictool ``` ```js import Pictool from 'pictool'; ``` or ```js import PictoolBrowser from 'pictool/dist/browser'; import PictoolUI from 'pictool/dist/ui'; import PictoolDigit from 'pictool/dist/digit'; ``` ### CDN Usage ```html ``` or ```html ``` ## Getting started ### JavaScript Code ```js import Pictool from 'pictool'; const src = './image/test.jpg'; const Sandbox = Pictool.browser.Sandbox; const sandbox = new Sandbox(src); const dom = document.querySelector('#J_Example_01'); sandbox.queueProcess([ { process: 'sobel', options: {}, }, { process: 'invert', options: {}, } ]).then(function(base64) { dom.innerHTML = ``; }).catch(function(err) { console.log(err); }); ``` ### HTML Code ```html
``` ### Browser Result ![001](https://user-images.githubusercontent.com/8216630/61582779-bb0ed680-ab61-11e9-8830-01fbf59edb94.jpg) ## Features - ✔︎ Brightness - ✔︎ Hue - ✔︎ Saturation - ✔︎ Alpha - ✔︎ Invert - ✔︎ Grayscale - ✔︎ Sobel - ✔︎ Sepia - ✔︎ Posterize - ✔︎ Gamma ## Documentation - [中文文档](https://chenshenhai.github.io/pictool-doc/) - [English Documents](https://chenshenhai.github.io/pictool-doc/page/en-US/) //TODO ## Example > Please use the latest version of Chrome Browser > 请在最新版本 chrome 浏览器下浏览 [https://chenshenhai.github.io/pictool/example/index.html](https://chenshenhai.github.io/pictool/example/index.html) ## Testing ```sh npm run test ``` ## License [MIT](./LICENSE)