Specifies the compression level for encoding the chart as a PNG image.

void object->SetPNGCompLevel( int comp_level )

Arguments

object
Required. A Chart object.
comp_level
Required. An integer value that specifies the compression level of the PNG encoding.

Remarks

The PNG compression level parameter is an integer between 0 to 9.
Specify 9 for high compression (small file, slowest), 1 for low compression (larger file, faster), 0 for no compression (largest file, fastest).
The default compression level is 3.

PHP Sample Code

The following PHP code illustrates use of the SetPNGCompLevel method.

$chart->SetDataFromQuery();
$chart->LoadStyle("C:\\myStyle.scs");

// Choose the PNG encoding quality
$chart->SetPNGCompLevel(9);

// Outputs the chart as a PNG image
$chart->SetOutputFormat( "PNG" );
$chart->ExportAsResponse();

See Also

SetOutputFormat Method | ExportAsResponse Method | ExportAsFile Method | ExportAsBinary Method | GetHTMLTag | GetOutputLocation Method

Applies To: Chart Object