Real Uploader can resize JPEG and PNG images before upload them on server, resize them directly
on the user browser. The image resize is implemented using the
PICA library, very fast and with very
high quality. On Chrome and Firefox resizing a 3000x5000 image on browser takes only 1s with PICA
library.
Real Upload provides also a thumbnail creation process on server side using the GD library of PHP.
This is useful for creating a copy or a small preview on server and will not affect the main image.
Real Uploader 4 has the following changes compared to Real Ajax Uploader
<div id="targetElement"></div>
<script type="text/javascript">
var uploader = new RealUploader("#targetElement", {
accept: "image/*",
resizeImage: {
maxWidth: 200,
maxHeight: 0,
outputQuality: 1,
scaleMethod: 3,
outputFormat: null,
allowOverResize: false,
keepExif: false,
keepAspectRatio: true,
unsharpAmount: 0,
unsharpThreshold: 0,
alpha: true
},
});
</script>
Thumbnail or image resize on server side can be done using the following options. By default this resize keeps aspect ratio and does not override the original images, just creates another copy on server.
<div id="targetElement"></div>
<script type="text/javascript">
var uploader = new RealUploader("#targetElement", {
accept: "image/*",
thumbHeight: 200,
thumbWidth: 0,
thumbPostfix: '_thumb',
thumbPath: '',
thumbFormat: ''
});
</script>