Hi,
The program I support exports a lot of graphics using the method presented in the Four Charts example you include with the program. That is, we create a TBitMap and paint it's canvas using the Chart.Draw function of each chart in question. Then, based on what type the user choses, we assign this TBitMap to either a TJPEGImage, TGIFImage, or TPNGImage and use the SaveToFile procedure. I have two questions for you.
1) How might I do this to export to a PDF? I found this old post from 2005 (http://www.teechart.net/support/viewtop ... ae90#p9987) where you stated it would be added to the wish list. Has this by chance been added in the last 10 years?
2) We've had several complaints from our users regarding the resolution of our charts. So we would like to expand our interface for our "Four Charts" exporting to include all of the same options that you provide on the export tab of the TChartEditor. This would mean having the ability to add the following for each chart type:
Bitmap: Colors, Monochrome, DPI
GIF: Compression, Dither, Reduction
JPEG: Quality, Gray Scale, Compression Quality, DPI
PNG: Compression Level
The things listed in bold are part of the TBitmap, TGIFImage, TJPEGImage, and TPNGImage classes. However, I cannot access the others. And DPI is the one I need the most. Can you please provide some help on how I can set the resolution and the other non-bold properties above? I tried TeeSetBitMapDPI and I'm not sure that really changed the DPI and when I copied the result to a JPEG, those were static at 96 DPI regardless of what resolution the original Bitmap was set to.
I would really appreciate your help!
SDE
Resolution and other features in the FourChart example
Re: Resolution and other features in the FourChart example
Hello,
http://bugs.teechart.net/show_bug.cgi?id=1473
Feel free to add your mail to the CC list to be automatically notified when an update arrives.
I'm afraid I can't find this old feature request so I've added a new one:sde wrote:1) How might I do this to export to a PDF? I found this old post from 2005 (viewtopic.php?f=3&t=2835&p=9987&hilit=exporting+four+charts+to+pdf&sid=c663294656b4787b8164741fe324ae90#p9987) where you stated it would be added to the wish list. Has this by chance been added in the last 10 years?
http://bugs.teechart.net/show_bug.cgi?id=1473
Feel free to add your mail to the CC list to be automatically notified when an update arrives.
I'll take a look at each feature an I'll tell you something asap.sde wrote:2) We've had several complaints from our users regarding the resolution of our charts. So we would like to expand our interface for our "Four Charts" exporting to include all of the same options that you provide on the export tab of the TChartEditor. This would mean having the ability to add the following for each chart type:
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Resolution and other features in the FourChart example
Hello,
Regarding the options in the editor, if you have the TeeChart sources you can take a look yourself at the units.
An alternative would be to navigate through the online reference.
I'll try to brief:
Regarding the printing resolution. Take a look at the printing better article here.Yeray wrote:I'll take a look at each feature an I'll tell you something asap.sde wrote:2) We've had several complaints from our users regarding the resolution of our charts. So we would like to expand our interface for our "Four Charts" exporting to include all of the same options that you provide on the export tab of the TChartEditor. This would mean having the ability to add the following for each chart type:
Regarding the options in the editor, if you have the TeeChart sources you can take a look yourself at the units.
An alternative would be to navigate through the online reference.
I'll try to brief:
- BMP Options (TeeBmpOptions.pas):
- Colors. This is used to set the PixelFormat property in TBitmap class. PixelFormat is of the type TPixelFormat, defined at Graphics.pas.
- Monochrome is a property in TBitmap class.
- DPI. This is set as explained here.
- JPEG Options (TeeJPEG.pas):
- Quality: This changes the CompressionQuality in TJPEGDefaults, defined in jpeg.pas. CompressionQuality is of the type TJPEGQualityRange also defined at jpeg.pas.
- Gray Scale: This changes the Grayscale property (boolean) in jpeg.pas.
- Compression Quality: CompressionQuality is a property of the type TJPEGQualityRange and it's defined in jpeg.pas.
- DPI: Pending. I'll edit this asap.
- PNG Options (TeePNG.pas):
- Compression Level: Compression is a property in TPNGExportFormat class in TeePNG.pas. This uses png_set_compression_level method from LPNG library.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |