When we originally discussed this bug, this is exactly what it seemed necessary to do: query the preview size.

Now that we are going to modify camera.js to explicitly request a prevew size, we could also just manually set metadata.preview.{width,height} here to the size we requested.  It depends, I guess, on whether we trust the camera hardware to honor the setting we give it.

This way is safer but slightly slower.  Since we only ever have to do this for one photo at a time, I think that the performance won't be an issue, and we should do it this way.

Note that when we convert to your EXIF parser, we will need a quick technique for obtaining the size of a jpeg without parsing all of its EXIF information.  But we can solve that problem later.