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

Message ListMessage List     Post MessagePost Message

  Maximum resolution of PNG
Posted by Vitaliy on Mar-20-2017 21:05
I want to make big plot of sparse matrix in PNG format and don't want to compress any pixel to lower resolution. I have found that maximum height and width of XYChart is 46340 that is correspond to signed 16 bit int. Any attempt to use higher values of height and width leads to crash (C++ ChartDir version is 6.1, Windows). Is it possible in some way to switch to unsigned 16 bit int to increase maximum resolution up to 65536 or higher? Current PNG format support max height and width equals 2^31.

  Re: Maximum resolution of PNG
Posted by Peter Kwan on Mar-21-2017 01:59
Hi Vitality,

ChartDirectror can support charts must wider or taller than 46340 pixels. However, the total number of pixels must be less 2G. For example, you create a chart of size 100000 x 500, as it contains less than 2G pixels. If an image really have 2G pixels, I think it requires at least 20G of memory. (Four bytes per pixel for the frame buffer, but a few more bytes of memory may be needed per pixel for various purposes, such as double buffering and various data structures for painting the chart to these 2G pixels.)

As ChartDirector is designed for charting, which likely would not require images of that size, we currently do not have plan to increase the 2G pixels limit.

For your case, you may need to use other PNG encoder to encoded your matrix.

Regards
Peter Kwan

  Re: Maximum resolution of PNG
Posted by Vitaliy on Mar-21-2017 14:09
Thank you very much for answer!

Sincerely,
Vitaliy