Skip to content

An IOS Photo Direction Repair Tool / IOS拍照方向修复工具、前端图片压缩工具

License

Notifications You must be signed in to change notification settings

tower1229/ios-photo-repair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 中文

ios-photo-repair

npm compatibility license

An IOS Photo Direction Repair Tool

Features

Simple and direct, two methods to solve two kinds of repair requirements in WEB environment

Getting started

  1. install with npm:
npm i ios-photo-repair --save
  1. import to your project
let { fixBySelector, fixImgFile } = require("ios-photo-repair")
  1. Fix the image file obtained by input:type=file
// fixImgFile(file, compressOption)

fixImgFile(file, {
    width:500,      // default unlimited
    height:500,     // default unlimited
    ratio: 0.92,     // default no compression
    outType: 'blob'  // default 'base64'
}).then(base64 => {
    document.getElementById('iosphoto').src = base64
})

Or, fix an img element

//fixBySelector(querySelector)

fixBySelector('#iosphoto')

License

MIT

About

An IOS Photo Direction Repair Tool / IOS拍照方向修复工具、前端图片压缩工具

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages