Patch for a more economical use of memory for large photos
*added max BufferedImage size in imageBuffer, (hard coded on 2000*3000)