App-Inventor-Gallery
App-Inventor-Gallery copied to clipboard
Verify and scale uploaded images
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
Do this in the client -- research ways to verify and then scale images using JavaScript.
Paul, and now for something completely different...
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.
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.
I thought this was non-trivial.
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.
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.
Store a thumbnail image (greatly scaled down) in addition to the properly scaled larger image. Add "thumbImage1" etc. field to ObjAppData