<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 3:58 AM, Kornel Lesinski <span dir="ltr"><<a href="mailto:kornel@geekhood.net">kornel@geekhood.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
JPEG can be efficiently decoded at fraction of its size — without full decode and scale process. This process also needs only fraction of memory required for full scaling, which might matter on low-end mobile devices. Letting UA utilize this feature may give huge performance gains.<br>
</blockquote><div><br></div><div>Agreed. I could see this being done.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Scaling isn't the only operation desirable — in some cases users might also want to crop the image (e.g., to upload only their face as an avatar), and cropping interface needs to be platform-specific — on touchscreen devices I'd rather use gestures than select-by-click'n'drag interface typical for desktop.<br>
</blockquote><div> </div><div>ok.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I think scaling of images before upload might be left completely up to UA. >From site's perspective it could look like user simply selected scaled-down file. It could even be done declaratively — site could define desired size and whether user should be asked to crop the image:<br>

<br>
<input type="file" accept="image/*" max-image-size="1000x1000" crop="allowed"><br></blockquote><div><br></div><div>This appears to be so limited that it doesn't allow for the web page to display a preview of what is being uploaded. Take the gmail example from that I gave in this thread, where the image is dragged into an email and then the image is resized before uploading. Ideally, the image shown in the email would be the image that is being sent.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Actually, I wish UAs offered scaling even for plain <input type=file>, because I don't expect every site with image upload to add extra code for resizing.</blockquote><div><br></div><div>I agree that having it be totally declarative would be simpler to write in a web page.</div>
<div><br></div><div>dave </div></div>