ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Using in-memory image instead of file
Posted by Michael Owen on Jun-10-2016 17:59
Hi,
Is there a way to display an in-memory (persistent) image instead or reloading from disk every time the chart is updated?  Layer.setDataSymbol2 works fine but requires disk access every time.
Thanks-

  Re: Using in-memory image instead of file
Posted by Peter Kwan on Jun-11-2016 00:08
Hi Michael,

From your description, I assume you are developing a desktop application (as opposed to a web application). You can load the image file into a DrawArea object, then use Layer.setDataSymbol3. The DrawArea object can be reused when the chart is updated. The exact code depends on your programming language. An example is:

DrawArea d = new DrawArea();
d.load("/path/to/my/image/file.png");

layer.setDataSymbol3(d);

Hope this can help.

Regards
Peter Kwan

  Re: Using in-memory image instead of file
Posted by Michael Owen on Jun-12-2016 19:27
Perfect!  Thank you Peter