Click or drag to resize

DbCommandImageAccessorExtractImageStream Method

Extracts a stream from a row of the database.

Namespace:  Atalasoft.Imaging.ImageSources.Data
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public virtual Stream ExtractImageStream(
	int imageStreamIndex
)

Parameters

imageStreamIndex
Type: SystemInt32
The index of the stream in the source

Return Value

Type: Stream
A stream representing the contents of the image

Implements

IDbImageAccessorExtractImageStream(Int32)
Remarks

This function is implemented for DbImageSource to use.

The field can either be a blob, image or string. If it is a string, it is interpreted as a filename and the filestream is opened. In order to get a connection to the database, the getConnection callback will be called -- the connection returned doesn't have to be opened (it will be opened when necessary), but this function will definitely close it before it returns. This method will use the property ImageFieldName to determine the column name of the image stream information. If that method returns null, it will assume that the information is in the first column.

See Also