html5-make-thumb
================
Create thumbnail with HTML5.
Useage
-------
``` html
<iframe name="ifr" style="display: none;"></iframe>
<form id="j-form" target="ifr" action="api.php" method="post" enctype="multipart/form-data">
<input type="file" name="upfile" id="j-file" />
</form>
<script src="jquery.js"></script>
<script src="jquery.make-thumb.js"></script>
```
``` javascript
var $form = $('#j-form');
var $file = $('#j-file');
$file.makeThumb({
width: 400,
height: 400,
mark: {padding: 5, src: 'mark.png', width: 30, height: 30},
success: function(dataURL, tSize, file, sSize, fEvt) {
// post data
var $up = $('<input type="hidden" name="base64">');
$up.insertAfter($file).val(dataURL);
$file.remove();
$form.submit();
}
});
```
[docs](http://www.fantxi.com/blog/archives/create-thumbnail-images-html5/)
reference
---------
- http://stackoverflow.com/questions/7296426/how-can-i-check-if-the-browser-support-html5-file-upload-formdata-object
- http://www.html5rocks.com/en/tutorials/file/dndfiles/
- https://github.com/Modernizr/Modernizr/blob/master/feature-detects/file-api.js
没有合适的资源?快使用搜索试试~ 我知道了~
移动端PC端图片压缩上传
共9个文件
js:4个
png:1个
php:1个
4星 · 超过85%的资源 需积分: 50 54 下载量 141 浏览量
2015-07-06
16:05:56
上传
评论
收藏 76KB ZIP 举报
温馨提示
移动端和PC端图片上传,显示,解决用户上传图片后,按照用户规定的尺寸大小或者按照图片比例,对图片进行压缩,html5+PHP实现。
资源推荐
资源详情
资源评论
收起资源包目录
html5-make-thumb-master.zip (9个子文件)
html5-make-thumb-master
jquery.make-thumb.js 6KB
megapix-image.js 8KB
exif.js 18KB
index.html 21KB
mark.png 73KB
api.php 1KB
.gitignore 14B
README.md 1KB
binaryajax.js 7KB
共 9 条
- 1
资源评论
- strike_out2015-07-07感觉好难哦!
- CTuMei2016-07-08虽然不能直接使用,但学习借鉴了
皇子疯
- 粉丝: 1
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功