![]() |
ACamera - winsoft
Hello,
are you using an Android Camera component from Winsoft? I need to advise how to use AutoFocus mode when shooting. When I click the button to automatically focus the camera on the media and focus it, it saves the photo in the ACamera.TakePicture procedure. It will surely be set in onAutoFocusMove. Thanks for the help. |
AW: ACamera - winsoft
Hi i use TACammera in my app:
![]() onAutofocus don't fire while my testings with nexus 5 The Autofocus works i take pictures while using the gyrosensor. if the phone stop moving i start scanning the pictures |
AW: ACamera - winsoft
Thank you,
please write your code. I use object photography, I do not use QRcode scanning. I use:
Delphi-Quellcode:
procedure TFormMain.ButtonTakePictureClick(Sender: TObject);
begin ACamera.FocusMode := foAuto; ACamera.TakePicture; end; procedure TFormMain.ACameraPictureTaken(Sender: TObject; Data: TArray<System.Byte>); begin TFile.WriteAllBytes(TPath.Combine(dirImages, edName.Text + '.jpg'), Data); end; |
AW: ACamera - winsoft
in ScanBitmap is the live Picture:
Delphi-Quellcode:
procedure TFM_Scann.ACameraDataReady(Sender: TObject; var ReleaseData: Boolean);
begin if (Processing = 0) and (barcodescanning=0) then begin Inc(Processing); try ACamera.DataToRgba(@RgbaData[0], ACamera.PreviewRotation, ACamera.PreviewHorizMirror); .... if (ACamera.PreviewRotation = ro0) or (ACamera.PreviewRotation = ro180) then ACamera.UpdateBitmap(ScanBitmap, @RgbaData[0], RgbaDataWidth, RgbaDataHeight) else ACamera.UpdateBitmap(ScanBitmap, @RgbaData[0], RgbaDataHeight, RgbaDataWidth); .... finally Dec(Processing); end; end; |
AW: ACamera - winsoft
Zitat:
ACamera.FocusMode := foAuto; before you take the picture (not a line before) .... the phone need a while to set the focus |
AW: ACamera - winsoft
Ok, I got it solved.
Delphi-Quellcode:
procedure TFormMain.ButtonTakePictureClick(Sender: TObject); begin ACamera.FocusMode := foAuto; ACamera.AutoFocus; // call onAutoFocus end; procedure TFormMain.ACameraAutoFocus(Sender: TObject; Success: Boolean); begin if success = True then // when it is focused then Take Picture begin ACamera.TakePicture; end; end; procedure TFormMain.ACameraPictureTaken(Sender: TObject; Data: TArray<System.Byte>); begin TFile.WriteAllBytes(TPath.Combine(dirImages, edName.Text + '.jpg'), Data); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz