How to draw FMX.Surface.TBitmapSurface on FMX.Graphics.TBitmap


Follwing on:
How to load large bitmap in FMX (fire monkey)
I have come to a need to draw whats on TBitmapSurface on the FMX.Graphics.TBitmap, i have found a lot of answer regarding this on the web, but they are either in VLC instead of FMX or their goal is saving and loading instead of drawing on a TBitmap, which is why i asked a new question here.
Now here is my current code for loading my image on the TBitmapSurface :

bitmapSurf: TBitmapSurface;
path: string;
path := ‘image.jpg’;
bitmapSurf := TBitmapSurface.Create;
TBitmapCodecManager.LoadFromFile(path, bitmapSurf);

Now after searching for a bit i found that i can use Scanline on the TBitmapSurface, but i didn’t know how to use it to draw on the TBitmap, on the web some people had used TBitmap.canvas.draw, but such a thing doesn’t exist on the FMX!.
In the end my goal is to draw a very large image (1000*16000) which is loaded in the TBitmapSurface on more then 1 TBitmap (because TBitmap doesn’t support more then 8192px and my height is 16000px, i need to draw this on two TBitmap).
I am using Delphi 10.2.3.

Comments are closed.