Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TakePhotoFromCameraAction1: Very low resolution


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Jan 28, 2018 9:41 AM Last Post By: Bart Kindt
Bart Kindt

Posts: 33
Registered: 12/16/07
TakePhotoFromCameraAction1: Very low resolution  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 26, 2018 9:37 PM
Using 10.2.2, Android.

When I take a photo using TakePhotoFromCameraAction1, and even when I set the MaxWith and MaxHeight high, the final Image(TBitmap) taken is only 520 by 390 pixels.
And whatever I try, I cannot get it any better.

This is a way to low resolution image to work with. The camera does X Megapixels...
How can I take a picture with a much higher resolution?

EDIT:
I added a whole new Action to start fresh. This fixed also the issue that the option 'NeedSaveToAlnbum" had no effect.

Now, when I set the MaxWidth and MaxHeight to 1024 (the default) I get a final resolution of 520x390.

But when I set H&W to 2048, I get a Image of 780 x 1040.

God knows what I have to do to get my maximum H or W at 1024.

Bart

Edited by: Bart Kindt on Jan 28, 2018 8:45 AM

Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: TakePhotoFromCameraAction1: Very low resolution [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 27, 2018 12:52 PM   in response to: Bart Kindt in response to: Bart Kindt
Bart Kindt wrote:

Now, when I set the MaxWidth and MaxHeight to 1024 (the default) I get a final resolution of 520x390.

But when I set H&W to 2048, I get a Image of 780 x 1040.

That makes sense, since 1040 > 1024.

God knows what I have to do to get my maximum H or W at 1024.

One option might be to use the AvailableCaptureSettings property of TCameraComponent to determine what resolutions are
available. Find a resolution where both values are >= 1024.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Bart Kindt

Posts: 33
Registered: 12/16/07
Re: TakePhotoFromCameraAction1: Very low resolution [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 28, 2018 9:41 AM   in response to: Dave Nottage in response to: Dave Nottage
I assumed that the received Image would automatically be scaled down to the value I set, but I understand that the Image is set to a series of fixed sized set by the camera, and if that does not fit exactly in the Max values, it steps down to the next lower pre-set scale of the camera...?

That explains it then.

PS, I did have a fault initially with the "TakePhotoFromCameraAction" which I originally generated at design time with a XE7. By deleting it, and setting it up again in 10.2.2 I solved the problem it would not respond to settings changes.

Thanks, Bart

Dave Nottage wrote:
Bart Kindt wrote:

Now, when I set the MaxWidth and MaxHeight to 1024 (the default) I get a final resolution of 520x390.

But when I set H&W to 2048, I get a Image of 780 x 1040.

That makes sense, since 1040 > 1024.

God knows what I have to do to get my maximum H or W at 1024.

One option might be to use the AvailableCaptureSettings property of TCameraComponent to determine what resolutions are
available. Find a resolution where both values are >= 1024.

---
Bart Kindt
CEO & Developer
SARTrack Limited New Zealand
http://www.sartrack.nz
steven chesser

Posts: 401
Registered: 4/13/09
Re: TakePhotoFromCameraAction1: Very low resolution  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 27, 2018 9:36 PM   in response to: Bart Kindt in response to: Bart Kindt
One thing I ran into in Berlin, was since the call is an Intent call, the stock camera app on device I was testing at time, someone had set it to a low resolution in the Camera App itself. And that limited
the resolution of the Delphi app then.. So no matter what the max rez set, it was limited by what the Android camera app was set to.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02