Omar Zelaya Posted September 9, 2020 Share Posted September 9, 2020 (edited) Hi, I'm using a "new" test device a Samsung SM-J260M with Android 8.0.1 with 10.4.1, now when I test the Camera Demo, when I take a pic, the preview image is not displayed ok. When I use front camera it works ok. Any hint? Thanks in advance, Omar Zelaya Edited September 9, 2020 by Omar Zelaya Link to comment Share on other sites More sharing options...
Administrators Yaroslav Brovin Posted September 24, 2020 Administrators Share Posted September 24, 2020 We have discussed this issue in direct chat with Omar. The problem is in his Samsung device. Each Android device provides configuration information about camera work. FGX Native provide special API for it FGX.Camera: IFGXCamera = interface ['{14C827DC-3D2C-4C40-8CFA-665CF1B7F937}'] function GetId: string; {$REGION 'Characteristics'} function GetType: TfgCameraType; function GetAvailableFrameSizes(const AFrameType: TfgFrameType): TArray<TSize>; overload; function GetAvailableFrameSizes(const AImageFormat: TfgImageFormat): TArray<TSize>; overload; function GetOutputSupportedFormats: TfgImageFormats; function GetCameraRotationAngle: TfgRotation; {$ENDREGION} Based on available configuration and user settings TfgCamera prepares session for capturing photo. Omar's device returns the followed JPEG format sizes: supportedSize=2048x1536 supportedSize=2048x1152 supportedSize=1920x1920 supportedSize=1920x1080 supportedSize=1440x1080 supportedSize=1280x720 supportedSize=1088x1088 supportedSize=1056x704 supportedSize=960x720 supportedSize=800x480 supportedSize=736x736 supportedSize=720x480 supportedSize=640x480 supportedSize=352x288 supportedSize=320x240 supportedSize=176x144 However, his device doesn't really support square aspect ratio. So bug in Samsung leads to offset result photo: We are not able to fix this bug in FGX Native library, because it's a low level camera implementation bug on operation system level. However, changing required photo size on other aspect ratio works fine. It's possible to specify required frame size via property TfgCamera.MaxFrameSize. Link to comment Share on other sites More sharing options...
Recommended Posts