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

Message ListMessage List     Post MessagePost Message

  High-res output?
Posted by Steve on May-11-2021 01:29
I need to produce publication-quality graphics of at least 300 dip.  makeChart produces screen-resolution graphics (72 dpi) and I can't find an option to change this.  Is there something I'm missing?

  Re: High-res output?
Posted by Peter Kwan on May-11-2021 14:22
Hi Steve,

From your previous post, I assume you are using Perl as the programming language.

We are currently upgrading ChartDirector to version 7.0. Because there are many programming language and operating system editions of ChartDirector, it may take sometime to complete the upgrade. Currently, the C++, Perl and Python editions have already been upgraded to 7.0. (They are uploaded to our web site last Sunday.)

If you are outputting the chart as a raster image (PNG, JPG, GIF, BMP), in ChartDirector 7.0, there is a built-in way to increase the "DPI" of the image. The code is:

# scale factor = 3
$c->setOutputOptions("bmpscale=3");
# output image as usual
$c->makeChart("aaa.png");

If you would like to continue to use ChartDirector 6, you can simply create the chart with more pixels in the first place, and display it at the same physical size so you get more pixels per inch. You can design your code so that the size is a variable that you can set to any value. The following is an example in our sample code in which the size is variable:

https://www.advsofteng.com/doc/cdperl.htm#neonroundmeter.htm

The followings are some explanation of what is "DPI" in images and how to obtain a higher resolution in general:

For "dot per inch" (DPI) in printing, the image controls the number of pixels available, while you control the inches available. For example, if you print a digital photograph, you can always print it very big or very small. So the image does not control the DPI, because it does not control the "inch" part. If you want high dot per inch, you can print it smaller so the pixels become denser, or you can create an image with more pixels in the first place.

If you insert an image into a document (such as PDF or Word), the document software should allow you to insert it at any size you want. If you do not provide a size, it may assume some default, such as 72dpi, that is, a 600 pixel wide image will occupy 8.33 inches on paper. You can always change the DPI by specifying a size for the image.

Also, note that the PPI (pixel per inch) in graphics is different DPI (dot per inch) for black and white text. A graphics pixel usually has 256 grey levels for each color. However, the print ink does not have grey levels. The printer normally needs to use multiple dots to emulate one grey level pixel. So 72 ppi would require close to 600 dot per inch when printing. (That's why color inkjets need to have 2400 dpi.)

Regards
Peter Kwan