[SOLVED]How to save multiple controls into one image file? lazarus / 39-Graphics ---------------------------------------------------------------------- CM630 · 2013-05-10 06:45 I need to save several TAcharts into one image file. They shall be placed one to another as they are placed in  the frame (sometimes their total height might be greater than the height of the screen). I hope there is an easy solution? Merging (adding) several images into one might b okay for me, since all the TACharts are one under another and they have equal dimensions. Separate TACharts are exported easily- Chart.SaveToBitmap(..) EDIT: So far I did things with ImageMagick: convert -append SourceImage1.bmp SourceImage2.bmp SourceImage3.bmp ..... TargetImage.bmp but I'd prefer a more native way? ---------------------------------------------------------------------- wp · 2013-05-14 07:26 Find the total height and maximum width of your charts.Create a bitmap and set its size accordingly.For each chart: create a temporary bitmap by calling SaveToImage(TBitmap), draw it onto the canvas of the total bitmap in the correct vertical position, free the temporary bitmap.Save the total bitmap to file, use standard bitmap techniques for file format conversion. This works for two charts: Code: [Select]procedure TForm1.SaveTwoCharts(AFileName: String); var   w,h: Integer;   y : Integer;   bmp: TBitmap;   img: TRasterImage; begin   w := max(Chart1.Width, Chart2.Width);   h := Chart1.Height + Chart2.Height;   bmp := TBitmap.Create;   try     bmp.SetSize(w, h);     y := 0;     img := Chart1.SaveToImage(TBitmap);     try       bmp.Canvas.Draw(0, y, img);       y := y + Chart1.Height;     finally       img.Free;     end;     img := Chart2.SaveToImage(TBitmap);     try       bmp.Canvas.Draw(0, y, img);     finally       img.Free;     end;     bmp.SaveToFile(AFileName);   finally     bmp.Free;   end; end; ---------------------------------------------------------------------- CM630 · 2013-05-17 11:06 Thanks, it's perfect!