taking pictures with media.show has odd resolution

When a picture is taken using the media.show API on an iPhone4 the size of the resulting image is 1024x768. Shouldn’t the camera return an image the same size as the display? Any ideas on how to get the camera to take pictures the same size as the display?

Different phones take pictures at different resolutions. In addition, they all have different display resolutions (potentially) as well.

What corona does is take the captured image and scales it down to something the SDK can handle internally, which is to shrink the image to either 1024x or 2048xsomething pixels. In your case, it looks like it got scaled down to 1024x768.

Which doesn’t match your particular cases screen resolution (it doesn’t match on any device).

However, there’s several ways to make it display nicely. Without regard to the image looking “stretched”, you can change the images .width and .height (if you change them proportionally, it will still look good), you can change the xScale and yScale, or you can re-capture the image (or portion thereof) using display.save / display.capture, if you want a smaller pixel size image than the original.

But the camera will capture images at that same size no matter what you do. After the image is captured, that’s where you can get to work…

Different phones take pictures at different resolutions. In addition, they all have different display resolutions (potentially) as well.

What corona does is take the captured image and scales it down to something the SDK can handle internally, which is to shrink the image to either 1024x or 2048xsomething pixels. In your case, it looks like it got scaled down to 1024x768.

Which doesn’t match your particular cases screen resolution (it doesn’t match on any device).

However, there’s several ways to make it display nicely. Without regard to the image looking “stretched”, you can change the images .width and .height (if you change them proportionally, it will still look good), you can change the xScale and yScale, or you can re-capture the image (or portion thereof) using display.save / display.capture, if you want a smaller pixel size image than the original.

But the camera will capture images at that same size no matter what you do. After the image is captured, that’s where you can get to work…