Compress the image to within the specified size. For example, 500KB
is not the specified size. Can 200X300
be achieved? The ones I can find online are all in designated sizes.
phpcn_u15822017-05-19 10:21:18
Can be implemented through Canvas, there is an open source project on Github: Portal
Pure front-end implementation, does not rely on the backend. However, the use of Canvas and File API has higher requirements on the browser (IE6/7/8 does not need to consider orz).
Demo address: Portal (tip: jquery uses google cdn and needs to cross the wall)
Screenshot:
Compression effect: