This documentation is for the old version. Go to the latest Graphics Mill docs

Bitmap.LoadThumbnail Method (Stream, Int32, Int32)

Loads the thumbnail from specified Stream on-the-fly.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Sub LoadThumbnail ( _
	stream As Stream, _
	width As Integer, _
	height As Integer _
)
C#
public void LoadThumbnail(
	Stream stream,
	int width,
	int height
)

Parameters

stream

Type: System.IO.Stream

Stream containing file to load.
width

Type: System.Int32

Width of the thumbnail bounding rectangle. You can pass 0 if you want method to find it automatically (see Remarks section for more details).
height

Type: System.Int32

Height of the thumbnail bounding rectangle. You can pass 0 if you want method to find it automatically (see Remarks section for more details).

Remarks

If multiframe file is loaded, thumbnail for the first frame is taken.

Width and height arguments specify a rectangle to fit the thumbnail in. If you omit one of these arguments (set to 0) it will be calculated automatically to preserve aspect ratio. You cannot specify both arguments to 0 at once.

Examples

Visual Basic
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
bitmap.LoadThumbnail(stream, 100, 100)
C#
Aurigma.GraphicsMill.Bitmap bitmap = 
    new Aurigma.GraphicsMill.Bitmap();
bitmap.LoadThumbnail(stream, 100, 100);

See Also

Reference