SendJPEG (Dundas Pie Chart Server 1.0)

Dundas

SendJPEG

Overview | Properties | Methods

Outputs a binary stream in JPEG format by using the Response.BinaryWrite Asp method.

Syntax

long = PieChartObject.SendJPEG(Width As Long, Height As Long, [Compression As Long = 20], [Smoothing As Long = 20])

The SendJPEG method syntax has the following parts:

Part

Description

Width

Width of the jpeg (pixels).

Height

Height of the jpeg (pixels).

Compression

The amount by which the original pie chart image is compressed. Ranges from 0 to 100 (no compression to maximum compression).

Smoothing

The amount of smoothing that occurs for the jpeg image. Ranges from 0 to 100 (no smoothing to maximum smoothing).

long

Returns a long indicating the success or failure of the operation. Zero (0) is returned if successful, otherwise a non-zero value is returned.

  Returns

A long which indicates the success/failure of the operation. Zero (0) is returned if successful, otherwise a non-zero value is returned. If an error occurs you can use this return value as the argument for GetErrorText in order to retrieve a relevant text error message, or alternatively you can rem out the "On Error Resume Next" statement and observe the thrown exception for a description of the error.

Remarks

Outputs a jpeg file by using the Response.BinaryWrite Asp method.

There are two ways to embed this jpeg file into an Asp page. The first is to use an <IMG> tag and set the SRC attribute to the secondary Asp page which is responsible for creating the Asp Pie Chart object and creating the pie chart (see Overview for more details). The second method is the same as the first except we use an <A> tag instead of an <IMG> tag. For an example of this see the Asp demo pages. You can also refer to the overview for more information.

IMPORTANT: The Response.BinaryWrite method utilizes HTTP headers, and as a result you CAN NOT insert any html code into the Asp page before calling this method!

See Also: CreateJPEGFile | Overview