Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chenshenhai/pictool

A front-end image processing gadget
https://github.com/chenshenhai/pictool

canvas hsl image-process rgb

Last synced: 3 days ago
JSON representation

A front-end image processing gadget

Awesome Lists containing this project

README

        

# Pictool

## A front-end image processing gadget
[![Node.js CI](https://github.com/chenshenhai/pictool/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/chenshenhai/pictool/actions/workflows/node.js.yml)
[![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




.box {float: left; margin-right: 10px;}
img { max-height: 200px; min-width: 100px;}









```

### 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)