Jump to content
View in the app

A better way to browse. Learn more.

FGX Native

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[TfgCamera] Corrupted result photo on Samsung device

Featured Replies

395832144_CapturadePantalla2020-09-08ala(s)8_03_53p.m..thumb.png.558cae67ee7f377d9f011064e3522a6f.pngHi,

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 by Omar Zelaya

  • 2 weeks later...
  • Administrators

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:

tmp.jpg

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.

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.