Thursday, May 10, 2012

Optional resizing before upload in Picasa Mobile

A new version of Picasa Mobile, 3.1.5, has just been released. The highlights of this update:
  • Optional resizing of photos before upload. This can be enabled from Settings -> Uploads -> Resizing, as shown in the screenshots below. When resizing is activated, the available photo sizes are 1280, 1024 and 800 pixels. This means that the photos will be scaled down to have the largest edge equal to the selected size, while preserving the aspect ratio. (Note: if a photo is smaller than the selected size, no scaling will be applied.)
  • We fixed an issue in the embedded camera  occurring on some low-end devices when the application would go into pause mode.


2 comments:

  1. According to google+,the biggest picture size allowed for unlimited photo storage is 2048 pixels in any dimension. Can that size be included too?

    ReplyDelete
    Replies
    1. That is actually a very good question...

      First of all, I want to clarify something: the resizing is optional, meaning that if not activated, the originals will be uploaded, regardless of their resolution.

      Regarding the actual question, the short answer is: on the Android device itself, I cannot *safely* resize a photo to any size I want. This is due to memory constraints. Depending on your particular Android model, an app is only allowed to access a tiny slice of the total available RAM (16 to 32 MB).
      Since for an *exact* resize, the photo has to be loaded in memory, for large photo sizes, this can easily lead to an "out of memory" app crash.

      Regarding Google+: if you are referring to this article, http://support.google.com/plus/bin/answer.py?hl=en&answer=1047381, my understanding is that the resize takes place *after* the upload, on Google's servers, where obviously the memory is not an issue. Of course, this would not help you reduce your data usage...

      Now, the somewhat longer answer:
      In Android, there are two main ways of resizing: downsampling and scaling.

      While downsampling does not require loading the photo in memory, its results are very imprecise. Basically, you can only divide the original photo size by an integer. For example, if the original's larger edge is 3000 pixels, you can only resize it to 1500, 1000, 750, 600 and so on. You can see how this can be quite far from the desired size, lets say 2048.

      For scaling, however, the opposite is true. You can scale an image as precisely as you want, but you have to fully load it in memory first. And like I mentioned earlier, you can run out of memory very easily...

      What Picasa Mobile does is: it first downsamples the photo to a size that is somewhat larger than the desired size, then it loads that in memory and scales it to the exact size. Sounds kind of complicated, but, as far as I know, it's the only way to work around the Android memory restrictions...

      I apologize for the long and winded description, but hopefully, this will help other users.

      Delete