Page 1 of 1

TColorGridSeries and BackImage

Posted: Fri Jan 29, 2010 4:11 pm
by 10047047
Hi,

I would like to display over 20 2D images (each has a resolution of 768x560) on the screen using TColorGridSeries. I have tried three methods to speed up data filling and image display
1. Filling data series using a dynamic array;
2. Set series bitmap using Series->Bitmap = aBitmap
3. Set BackImage using Chart->BackImage = aBitmap
Both methods 1 and 2 take very long time to redraw the images when resize window. Is there any way to plot fast? The method 3 (BackImage) is much faster, but I can't use zoom and scrool features. How can I implement zoom and scrool functions for a BackImage? Can I use the BackImage->Draw method and How?

Thanks in advance.

Xia

Re: TColorGridSeries and BackImage

Posted: Fri Jan 29, 2010 7:41 pm
by narcis
Hi Xia,

The only problem here is that you have several TColorGridSeries with many data points. 768x560 = 430080 cells per series, that's quite a lot of data for such series. For performance you should avoid using IrregularGrid=False. What would help the most would be decreasing images resolution.

Re: TColorGridSeries and BackImage

Posted: Mon Feb 01, 2010 9:35 am
by 10047047
Hi Narcis,

Thanks for your reply.

I understood that it is a large amount of data points to be processed and TColorGridSeries may not be suitable for a high resolution 2D image (>500x500). Filling data series doesn't take too much time, the main problem is the time to replot the image when resizing the image even using set series bitmap method. Therefore I have to use the BackImage method which doesn't use TColorGridSeries, i.e. generate a bitmap for the 2D image and copy to BackImage for display. My question is how I can zoom and scroll the backimage bitmap when you click and drag the left mouse from left/top to right/bottom. I have looked at the BackImage->Draw(Panel, Rect, Z) function. What are the Panel and Z? Do you have an example of using this function?

Regards

Xia

Re: TColorGridSeries and BackImage

Posted: Tue Feb 02, 2010 4:33 pm
by yeray
Hi Xia,

Have you seen the demo at All features/Welcome !/Tools/Image? I think it is what you are looking for.

Re: TColorGridSeries and BackImage

Posted: Fri Feb 05, 2010 11:58 am
by 10047047
Hi Yeray,

Thanks.

It works and I will recommend to use TChartImageTool when handling a large amount of 2D image data for fast display.

Regards

Xia