I recently upgraded from TChart ActiveX v7 to v2015. The APIs for SaveToBitmapFile and SaveToJPEG file have changed. What default arguments do I use in my code for the new parameters? The first argument is the file name in both cases but I need to get some idea of what defaults to use for the other arguments in the calls?
In SaveToBitmapFile, I've used 0 for the DPI but with SaveToJPEGFile, there are many more arguments. Are there any examples I can refer to?
SaveToBitmapFile and SaveToJPEGFile
Re: SaveToBitmapFile and SaveToJPEGFile
Hello,
As you've seen SaveToBitmapFile and SaveToJPEGFile have added a [DPI As Long] parameter. Note this parameter is optional and the rest of parameters in SaveToJPEGFile were already in v7.
In v7 we had:
- Options for BMP:
- Options for JPEG:
In v2015 these methods are:
- Options for BMP:
- Options for JPEG:
The arguments in SaveToJPEGFile are:
- FileName As String: Complete path and filename to create the image file.
- Gray As Boolean: Choose if the generated image should be colored or B&W.
- Performance As EJPEGPerformance: jpegBestQuality or jpegBestSpeed.
- Quality As Long: 100 = best quality, 25 = pretty awful.
- Width As Long, Height As Long: Define the image size.
- [DPI As Long]: Define the DPIs of the image. Optional.
As you've seen SaveToBitmapFile and SaveToJPEGFile have added a [DPI As Long] parameter. Note this parameter is optional and the rest of parameters in SaveToJPEGFile were already in v7.
In v7 we had:
- Options for BMP:
Code: Select all
TChart1.Export.SaveToBitmapFile(FileName As String)
TChart1.Export.asBMP.SaveToFile(FileName As String)
Code: Select all
TChart1.Export.SaveToJPEGFile(FileName As String, Gray As Boolean, Performance As EJPEGPerformance, Quality As Long, Width As Long, Height As Long)
TChart1.Export.asJPEG.SaveToFile(FileName As String)
- Options for BMP:
Code: Select all
TChart1.Export.SaveToBitmapFile(FileName As String, [DPI As Long])
TChart1.Export.asBMP.SaveToFile(FileName As String)
Code: Select all
TChart1.Export.SaveToJPEGFile(FileName As String, Gray As Boolean, Performance As EJPEGPerformance, Quality As Long, Width As Long, Height As Long, [DPI As Long])
TChart1.Export.asJPEG.SaveToFile(FileName As String)
- FileName As String: Complete path and filename to create the image file.
- Gray As Boolean: Choose if the generated image should be colored or B&W.
- Performance As EJPEGPerformance: jpegBestQuality or jpegBestSpeed.
- Quality As Long: 100 = best quality, 25 = pretty awful.
- Width As Long, Height As Long: Define the image size.
- [DPI As Long]: Define the DPIs of the image. Optional.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SaveToBitmapFile and SaveToJPEGFile
Thanks. What are the units for the Width and Height parameters?
Re: SaveToBitmapFile and SaveToJPEGFile
Hi,
Pixels.nbp wrote:What are the units for the Width and Height parameters?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |