Loads the thumbnail from specified file on-the-fly.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub LoadThumbnail ( _ fileName As String, _ width As Integer, _ height As Integer _ )
Type: System.String
Name of the file to load.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).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).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.
'Resize image proportionally to width not larger then 100 bitmap.LoadThumbnail("c:\Mountain.jpg", 100, 0) 'Resize image proportionally to height not larger then 100 'bitmap.LoadThumbnail("c:\Mountain.jpg", 0, 100) 'Resize image proportionally to fit in rectangle 100x100 'bitmap.LoadThumbnail("c:\Mountain.jpg", 100, 100)
//Resize image proportionally to width not larger then 100 bitmap.LoadThumbnail(@"c:\Mountain.jpg", 100, 0); //Resize image proportionally to height not larger then 100 //bitmap.LoadThumbnail(@"c:\Mountain.jpg", 0, 100); //Resize image proportionally to fit in rectangle 100x100 //bitmap.LoadThumbnail(@"c:\Mountain.jpg", 100, 100);