Jump to content
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr ×
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr

질문

에 포스트됨 (edited)

123.png.fae9f8d5bb02637476c2c5136e72b8f3.png

 

구글플레이에 최근에  앱을 업데이트 해보니 권장조치가 생겼네요.

찾아보니 delphi 13 fmx에서는 inSampleSize가 없는기능 같은데요. JNI 를 사용해서 사용해야하는건지 궁금하네요.

제가 못찾는걸수도 있으니 혹시나 있으면 답변 부탁드립니다.

--------------------------------------------------------

procedure TFormSawonView.LoadImageFromURL(const ImageURL: string);
var
  HttpClient: THTTPClient;
  MemoryStream: TMemoryStream;
  CurrentWidth, CurrentHeight: Single;
  CurrentPosX, CurrentPosY: Single;
begin
  HttpClient := THTTPClient.Create;
  MemoryStream := TMemoryStream.Create;
  try
    HttpClient.Get(ImageURL, MemoryStream);
    MemoryStream.Position := 0;
    ImageSawon.Bitmap.Clear(TAlphaColors.Null); // 투명하게 지움
    ImageSawon.Bitmap.LoadFromStream(MemoryStream);
    {
      if MemoryStream.Size = 0 then
      ShowMessage('이미지 다운로드 실패 또는 비어 있음');

      ImageSawon.Width := 363;
      ImageSawon.Height := 558;
      ImageSawon.Position.X := 2;
      ImageSawon.Position.Y := 4;
    }

  finally
    MemoryStream.Free;
    HttpClient.Free;
  end;
end;
 

Edited by 이서준

7 answers to this question

Recommended Posts

  • 1
에 포스트됨

티켓을 먼저 올리고,그 티켓 번호를 이용해 기술지원 요청을 추가로 하는 것이 좋을 것으로 생각됩니다. 티켓은 누구든지 올릴 수 있습니다. 어차피 기술 지원을 등록하시면 전담 엔지니어가 할당됩니다. 따라서, 티켓은 그냥 데브기어에서 올릴 수 있지만, 저희가 직접 재현할 수는 없기 때문에, 부득이 직접 올려주셔야 할 것 같습니다. 등록은 어렵지 않으며, 이미 엔지니어에게 문의했던 내용이 있으니, 그 내용을 전달해드리겠습니다. 그것을 사용하면 쉽게 등록하실 수 있습니다. 다만 등록 시, 현재 RAD Studio의 빌드 번호 등 현재 환경에 대한 필수 정보들을 기입하셔야 합니다.

이 이슈에 대한 티켓 등록 안내:

1. Quality Portal 이용 안내: 

 

2. 등록할 내용 안내:

  • Summary: Google Play Console flags FMX's internal Android bitmap decoder (BitmapFactoryBitmapDecoder) for not setting inSampleSize, regardless of application code
  • Component ~ Platform: 현재 상황에 맞는 내용을 선택 또는 기입하세요.
    • 참고로,
    • Component: FireMonkey
    • Affected Versions: 13.1
    • Build No: RAD Studio 메뉴 > Help > (가장 밑에 있는 항목인) About 을 선택하면 나옵니다. 가장 최신이라면 아마, 37.0.59082.6021 일 것입니다.
    • Edition: All
    • Language Version: 한국 사용자 대부분은 English입니다.
    • Platform: Android
  • Description: (아래 1 참조)
  • Steps: (아래 2참조)
  • Attachment: ("첫 질문에서 제공하신 구글 플레이 스크린샷"을 첨부하세요)

아래

1. (Description)

a Google Play Console "Recommended action" warning after updating my Delphi 13 Android app. The warning identifies com.embarcadero.firemonkey.decode.BitmapFactoryBitmapDecoder.decode — an FMX-internal class, not application code — as calling Android's BitmapFactory without setting BitmapFactory.Options.inSampleSize. We would like to have any supported options (or could be considered) to enable downsampling.

2. (Steps)

In a Delphi 13 (Florence) FMX Android app, download an image at runtime and load it into a TImage.Bitmap via TBitmap.LoadFromStream,

e.g.:

//----------------------------------------

procedure TFormSawonView.LoadImageFromURL(const ImageURL: string);
var
  HttpClient: THTTPClient;
  MemoryStream: TMemoryStream;
  CurrentWidth, CurrentHeight: Single;
  CurrentPosX, CurrentPosY: Single;
begin
  HttpClient := THTTPClient.Create;
  MemoryStream := TMemoryStream.Create;
  try
    HttpClient.Get(ImageURL, MemoryStream);
    MemoryStream.Position := 0;
    ImageSawon.Bitmap.Clear(TAlphaColors.Null); 
    ImageSawon.Bitmap.LoadFromStream(MemoryStream);

  finally
    MemoryStream.Free;
    HttpClient.Free;
  end;
end; //----------------------------------------

Publish/update the app on Google Play and check the Play Console's "App quality" / recommended actions section.

Observed Result

Google Play Console reports the following recommended action (translated from Korean):

Improve app performance with bitmap downsampling. Your app is using BitmapFactory without downsampling at the following location:
• com.embarcadero.firemonkey.decode.BitmapFactoryBitmapDecoder.decode
– Issue type: inSampleSize is not set on BitmapFactory.Options

Especially if image resolution increases in a future update, loading the bitmap at full resolution could cause excessive memory usage. It's best to use an image-loading library that automatically handles memory management and downsampling. If you must use BitmapFactory directly, you should downsample the image to the required display size using BitmapFactory.Options.inSampleSize.

The flagged class, BitmapFactoryBitmapDecoder, is part of the FMX RTL rather than user code, so the recommendation applies regardless of how the developer calls TBitmap.LoadFromStream.

Expected Result / Question for Embarcadero

Is it expected/known behavior that BitmapFactoryBitmapDecoder decodes images on Android via BitmapFactory without setting inSampleSize?

Is there a currently supported way to influence downsampling behavior from the FMX side — e.g., a property, codec setting, or alternate loading path — that we may have missed?

If no such control currently exists, could inSampleSize support (or an equivalent downsampling option) be considered for a future RTL update, given that Google Play now surfaces this as a per-app performance recommendation?

Note for Attachments

Play Console screenshot (Korean) showing the recommended action, to be attached to this report.

  • 0
에 포스트됨

[2026-7-7 업데이트]

inSampleSize는 FMX에 구현되어 있지 않은 것으로 파악된다는 답변을 받았습니다. 엠바카데로에서 빠르게 해결책을 제공할 수 있는 이슈는 아닌 것으로 보입니다. 예를 들어, FMX.Graphics.Android.pas 의 코드 깊숙이 들어 있는 내용을 파악한 후에, SampleSize 같은 프로퍼티를 노출하는 방법 등을 찾을 필요가 있기 때문입니다. 안타깝지만, 조치가 시급하다면, JNI를 사용하시거나, 또는 FMX.Graphics.Android.pas의 하위 클래스를 만들어, 해당 기능을 넣으셔야 할 것으로 보입니다.

이와 별개로, 누구나 리포트/제안을 할 수 있는 곳인 Quality Portal에 ticket을 제출해볼까 생각합니다. 저희가 재현하기는 어렵기 때문에 혹시 ticket 제출과정에 도움이 필요할 수 있습니다.  그리고 이와 별개로, @이서준님이 업데이트 서브스크립션을 유지하고 있으시다면, 엠바카데로의 정식 기술 지원을 요청하는 것도 좋겠다고 생각됩니다. 엠바카데로의 정식 기술 지원을 받은 분들은 전담 엔지니어들의 지원에 상당히 만족하는 것으로 알고 있습니다.

[2026-7-6 업데이트]

문의를 주셔서 고맙습니다. 보내주신 이미지를 통해 추정하건데, 엠바카데로에 구현되어 있지 않은 것으로 추정됩니다. 확실하지 않으므로, 엠바카데로에게 문의를 해 놓았습니다. 엠바카데로에서 필요한 조치일 수도 있기 때문입니다. 회신을 받는데로 답변을 업데이트하겠습니다.

  • 0
에 포스트됨

답변감사합니다. 서브스크럽션은 현재 사용중이며  종료일은 아직 남아있네요. 정식기술지원 요청 및 ticket은 제가 해야하는건지 궁금하네요. 

아마 추후에 다른분들도 이런 권장조치를 받을 수 있을거 같은데 지금 아니더라도 해당기능을 업데이트 해주셨으면 좋겠습니다.

 555555.png.fb43b97586de3823a35c11adb4ee649d.png

  • 0
에 포스트됨

UpdateSubscription(유지보수) 고객은 1년에 3번 정식 기술지원을 받을 수 있습니다.

정식 기술 지원을 받기 위해서는 Support Customer Portal Access가 필요하며, 이는 Embarcadero Support에서 신청할 수 있습니다.

 

■ 엠바카데로 유지보수 고객 대상 기술 지원 방법 안내

    □ https://supportforms.embarcadero.com/ 에 접속하여 Support Customer Portal Access를 신청하세요.
      □ https://idera.my.salesforce-sites.com/CG/ 에 접속하여 앞선 단계에서 획득한 Access 정보를 통해 엠바카데로의 기술 지원을 받아보세요.

정식 기술 지원 포탈(Support Customer Portal)에서 앞서 생성하신 Ticket 번호를 지원 요청안에 넣어 전달한다면, 전담 엔지니어를 통해 더 만족스러운 답변을 얻을 수 있습니다.
위 유지보수 고객 대상 기술지원 방법 안내에 따라 정식 기술지원을 받아보시는 것을 권유드립니다.

  • 0
에 포스트됨

13.2에서 해당 문제가 해소될 예정이라고 합니다. 현재 베타가 진행 중이며, 서브스크립션 유지 고객은 베타 프로그램에 참여하실 수 있습니다. 아래 안내에 따라 베타에 참여하셔서 해당 문제가 해소되었는지 사전에 확인하시는 것을 권장합니다. 혹시라도 해소되지 않았다면, 해당 베타에 대한 버그 리포트를 통해서 확실하게 13.2에서 해소가 될 수 있도록 적극적으로 참여하는 것도 좋습니다.

베타 프로그램 초청 기고:

 

이 토의에 참여하세요

지금 바로 의견을 남길 수 있습니다. 그리고 나서 가입해도 됩니다. 이미 회원이라면, 지금 로그인하고 본인 계정으로 의견을 남기세요.

Guest
이 질문에 답변하기...

×   서식있는 텍스트로 붙여넣기.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   이전에 작성한 콘텐츠가 복원되었습니다..   편집창 비우기

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

중요한 정보

이용약관 개인정보보호정책 이용규칙 이 사이트가 더 잘 작동하기 위해 방문자의 컴퓨터에 쿠키가 배치됩니다. 쿠키 설정 변경에서 원하는 설정을 할 수 있습니다. 변경하지 않으면 쿠키를 허용하는 것으로 이해합니다.