Skip to content

파일 업로드 시에 사용 할 수 있는 이미지 사이즈 변경 라이브러리

License

Notifications You must be signed in to change notification settings

kwon1983/ImageResizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImageResizer

  • 이미지 파일을 리사이징 해줌
  • 사진 첨부파일 업로드 시에 네트워크 사용을 최소화 시키기 위함
  • exception!! 만약 img 태그를 사용할 경우 브라우저 보안정책에 의해 동일 도메인의 이미지만 올릴 수 있음

사용법

ImageResizer.resize({
	image: file,
	width: 140,
	height: 140,
	ratio: 0.5,
	returnType: 'blob'
}).then(function(resizeFile) {
	console.log(resizeFile);
});

resieze(options)

  • image(require)
  • image data(file or img)
  • width, height(require)
  • 사이즈로 변경
  • ratio 둘중 하나 require
  • ratio(require)
  • 비울로 변경
  • returnType
  • blob or file(string) 리턴받을 이미지 타입 default image

About

파일 업로드 시에 사용 할 수 있는 이미지 사이즈 변경 라이브러리

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published