OurImage = Image.JPEG.decode(buff);
If you're creating thumbnails, I would recommend to use | Image.JPEG.decode(buff,(["scale_num":1,"scale_denum":8])) since JPEGlib then is given freedom to scale the image to 1/8th immediately, and this usually speeds things up a lot. (2 and 4 works too.)