# passport-editor

> 证件照编辑器

Latest version **0.0.1** (published 2018-12-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install passport-editor
pnpm add passport-editor
yarn add passport-editor
bun add passport-editor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-12-28 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mljsgto222 |

## Links

- npm: https://www.npmjs.com/package/passport-editor
- Repository: git@git.huanleguang.com:danchaofan/passport-photo
- npm.io page: https://npm.io/package/passport-editor

## Recent versions

- 0.0.1 (latest) — 2018-12-28

## README

# 证件照编辑器

这个是证件照的编辑器组件

## 安装

```bash
npm install @gaoding/passport-editor --save
```

## 使用

```css
passport-editor {
    width: 100%;
    height: 100%;
}
```

```html
<passport-editor
    :options="options"
    :passport-width="passportWidth"
    :passport-height="passportHeight"
    :origin-image-url="originImageUrl"
    :clipInfo="clipInfo"
    >
</passport-editor>
```

```js
import Vue from 'vue';
import PassportEditor from '@gaoding/passpotr-editor';

Vue.use(PassportEditor);

export default {
    data() {
        return {
            options: { }, // 编辑器配置（可选）
            passportWidth: 650, // 证件照宽度
            passportHeight: 950 // 证件照高度
            originImageUrl: '' // 证件照原始图片地址
            clipInfo: {
                pupilBaseUrl: '' // 瞳孔底图
                pupilEffectUrls: ['', '', ''] // 瞳孔高光叠加图地址, 目前有3张
                faceRect: {
                    left: 0, // 面部左边界
                    top: 0, // 面部上边界
                    right: 0, // 面部右边界
                    bottom: 0, // 面部下边界
                    width: 0, // 面部宽度
                    height: 0, // 面部高度
                    id: 0 // id，目前固定为0
                },
                faceEdgePoints: { 
                    x: [], // 面部关键点x坐标地址列表，固定68个
                    y: [] // 面部关键点y坐标地址列表，固定68个
                },
                cutoutImageUrl: '' // AI抠图后的证件照图片地址
                whiteningUrls: [] // 磨皮美白预处理后的证件照图片地址列表，目前有4张
            }
        }
    }
}
```

### 参数说明

####

## Compiles and hot-reloads for development

```bash
npm run dev
```

## Compiles and minifies for production
```bash
npm run build
```

---
_Source: https://npm.io/package/passport-editor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
