Q. By default, the ACTION_IMAGE_CAPTURE intent returns a small bitmap graphic of the photo taken by the camera. However, the full-size graphic captured by the camera is much larger. Can I access this photograph data?

A. You can control the data returned by camera application by supplying some extra data (specifically, the EXTRA_OUTPUT field) to the intent.

Q. How can I maintain aspect ratio when scaling a Bitmap graphic?

A. To maintain the aspect ratio of a graphic, simply scale each axis (x and y) by the same percentage. Don't forget that if you apply scaling to all graphics, some may be down-scaled while others may be up-scaled, using the same code.

0 0

Post a comment