Skip to content

基于js的图片转换工具。在图片上传shi时,进行图片压缩、exif信息处理等功能。

Notifications You must be signed in to change notification settings

mathcoder23/js-image-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image-tool

提供上传图片的压缩,exif手机图片的方向矫正

使用方法

导入

 import {ImageTool} from "image-tool";

file转base64

ImageTool.imgCompressAndOrientationAdjust(file).then(base64=>{
    //base64
})

file转blob

ImageTool.imgCompressAndOrientationAdjust2Blob(file).then(blob=>{
    //blob
})

默认压缩为800*800,若要配置压缩参数在第二参数传入对象 {w:800,h:800}

About

基于js的图片转换工具。在图片上传shi时,进行图片压缩、exif信息处理等功能。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published