App-Inventor-Gallery icon indicating copy to clipboard operation
App-Inventor-Gallery copied to clipboard

Verify and scale uploaded images

Open derrell opened this issue 13 years ago • 8 comments

When images are uploaded, they should be verified to be in known, proper image format, and scaled down to some maximum resolution if too large

derrell avatar Sep 24 '11 00:09 derrell

Do this in the client -- research ways to verify and then scale images using JavaScript.

fgmart-zz avatar Oct 14 '11 18:10 fgmart-zz

Paul, and now for something completely different...

derrell avatar Nov 06 '11 21:11 derrell

I think this will take me about a hour and a half. 30 minutes of researching how to do this with javascript and an hour to implement.

cpuwhiz11 avatar Nov 07 '11 01:11 cpuwhiz11

I underestimated how long this is going to take. It seems that it will take about an two hours to research and an hour to implement. I am currently looking at using plupload (http://www.plupload.com/index.php) to resolve this.

cpuwhiz11 avatar Nov 13 '11 23:11 cpuwhiz11

I thought this was non-trivial.

fgmart-zz avatar Nov 13 '11 23:11 fgmart-zz

Having spent a while looking into this myself, I believe that the early decision to do this in the client was a poor one. Particularly since we can't count on the data being sent to the server and would have to validate and resize again at the client, I think we can do some really quick checks at the client, and then push this resizing to the server. There is an Images API for App Engine which includes transforms. Resizing there is trivial. It does require a binary blob, though, so that resizing should be done in the background task that will be converting the base64 image to binary.

Let's discuss this some at the Monday scrum.

derrell avatar Nov 13 '11 23:11 derrell

Have completed part of this assignment. Submitted changes so that on the client side it will test for a maximum image size and if the image is actually an image. These changes are detailed in 153d859f, a6ddf2e3, and d2b566e6.

After being told about the system this took me about two hours to do. Many hours were spent getting to that point however.

cpuwhiz11 avatar Dec 01 '11 19:12 cpuwhiz11

Store a thumbnail image (greatly scaled down) in addition to the properly scaled larger image. Add "thumbImage1" etc. field to ObjAppData

derrell avatar Dec 05 '11 17:12 derrell