项目
在 GitHub 查看
josefrichter/resize
关于
公开 GitHub 仓库
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文12 Sep 2012 Preprocessing (scaling down) images on client side before uploading Because people often upload 5MB big 3000x2000px PNGs that are then scaled down to 100x100px JPEGs on server - waste of time and bandwidth 1. user selects image(s) 2. script opens the image using FileReader API 3. script appends it to new Image object (not displayed at all actually) 4. new Image objects is drawn into new Canvas object, that is scaled down to desired dimensions 5. display the canvas, ie. a preview of the image to be uploaded 6. take the pic from canvas as JPEG in dataURI format 7. send it to server 8. save it on server side (c) Josef Richter
探索相关项目
加载中…