Jump to content

[TfgCamera] Corrupted result photo on Samsung device


Omar Zelaya

Recommended Posts

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
Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...