Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS VCL Chart
Exporting to PNG, JPEG, TIFF, BMP or GIF files (GDI+)

Saving to a Windows bitmap file offers good quality but generates large files. You can save the AdvChartView to different image formats to improve / reduce the size and quality. The image formats currently supported are JPEG, PNG, BMP, GIF, TIFF. You can also save a single pane to a different image format. Using the method SaveToImage(), by default the image will be saved to Windows bitmap (BMP) format. If you set the extra format parameter (itJPEG, itBMP, itPNG, itGIF, itTIFF), you can choose in which encoded image type your result image will be saved.

Example:

Save to a jpeg with 50 % quality (quality only has effect on the jpeg format).
if SavePictureDialog1.Execute then 
begin 
  //for example the size of the picture has been set to a 1000 x 500 
  //resolution. 
  AdvChartView1.SaveToImage(SavePictureDialog1.FileName, 1000, 500, itJPEG, 50); 
end;
Save a single chart pane to a PNG format
if SavePictureDialog1.Execute then 
begin 
  //for example the size of the picture has been set to a 1000 x 500 
  //resolution. 
  AdvChartView1.Panes[0].Chart.SaveToImage(SavePictureDialog1.FileName, 1000, 500, itPNG); 
end;
Result when choosing 0 and 100 %.