IResourceFileServiceGetImageThumbnail Method

Gets a stream providing a thumbnail of an image.

Namespace:  Dundas.BI.FileSystem
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
Stream GetImageThumbnail(
	Guid resourceId,
	int? maxWidth,
	int? maxHeight
)

Parameters

resourceId
Type: SystemGuid
The ID of the image resource.
maxWidth
Type: SystemNullableInt32
The maximum width of the thumbnail, or if there is no width restriction.
maxHeight
Type: SystemNullableInt32
The maximum height of the thumbnail, or if there is no height restriction.

Return Value

Type: Stream
A stream providing a thumbnail of the image in PNG format.
Exceptions
ExceptionCondition
ArgumentExceptionresourceId is Empty.
ArgumentOutOfRangeExceptionmaxWidth or maxHeight is less than or equal to zero.
InvalidOperationExceptionresourceId corresponds to an entry which is not an image resource.
NotFoundExceptionThe resource with the specified ID does not exist.
NoPrivilegeExceptionThe caller does not have the Read privilege on the image resource.
InvalidSessionExceptionThe caller context is not associated with a valid session.
Remarks
Caution note Caution
The stream returned by this method must be disposed before any further database access occurs on the calling thread.

If both maxWidth and maxHeight are , the original image is returned unaltered.

See Also