2 Star 8 Fork 4

韩子卢 / Img4Transparent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Img4Transparent

纯前端实现图片背景透明化

使用

运行

npm run dev

然后在页面上进行操作:

  1. 上传图片
  2. 点击图片,将以鼠标点击处的颜色为标准,对色差20之内的颜色进行透明化处理。(如果想调整色差标准,可以在控制台下设置transparentConfig.colorDiff)
  3. 对出现透明化处理有有误的地方,可以开启恢复模式,再次移动鼠标到图片上,此时鼠标会变成红色小方框,小方框区域内会显示原始图像。点击后会将红色小方框区域内的图像恢复为原始图像。(如果想调整小方框尺寸,可以在控制台下通transparentConfig.setRecoverSize(30)的方式进行修改)
  4. 下载图片,搞定。

实际应用可参考博客:

http://www.cnblogs.com/vvjiang/p/9005804.html

MIT License Copyright (c) 2018 韩子卢 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

纯前端实现图片背景透明化 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/vvjiang/Img4Transparent.git
git@gitee.com:vvjiang/Img4Transparent.git
vvjiang
Img4Transparent
Img4Transparent
master

搜索帮助