How to Save TPath Data As a `.jpg` Image

  

I’m new to Delphi. I need a help for complete my code. I just drawing a path. Now i want to save it to Android local storage as an Image format.
This is my code

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
if ssLeft in Shift then
Path1.Data.MoveTo(PointF(X,Y) – Path1.BoundsRect.TopLeft);
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
begin
if ssLeft in Shift then
Path1.Data.LineTo(PointF(X,Y) – Path1.BoundsRect.TopLeft);
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
//save code goes here
end;

Comments are closed.