Skip to content
HTML5 Make thumb
JavaScript HTML PHP
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add ignore Aug 1, 2013
README.md copy files from widows Aug 1, 2013
api.php + 优化上传: 优先使用二进制上传 Mar 3, 2015
binaryajax.js init new version Aug 1, 2013
exif.js init new version Aug 1, 2013
index.html
jquery.make-thumb.js + 优化上传: 优先使用二进制上传 Mar 3, 2015
mark.png test Jan 8, 2013
megapix-image.js init new version Aug 1, 2013

README.md

html5-make-thumb

Create thumbnail with HTML5.

Useage

<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>
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

reference

You can’t perform that action at this time.