|
Create the thumbnail and keep aspect ratio.
Public Function CreateThumbnail( _ ByVal strFileName As String, _ ByVal strFileType As String, _ ByVal iThumbnailWidth As Integer, _ ByVal iThumbnailHeight As Integer, _ ByVal clrBackColor As Color ) As Integer
|
Parameter
strFileName the new file you want to save.
strFileType the Image format you want to save. JPG - JPEG file. PNG - PNG file. GIF - GIF file. TIF - TIF file. BMP - BMP file. PDF - PDF file. WBMP - WBMP file. PCX - PCX file. TGA - TGA file. ICO - ICO file. JP2 - JP2 file. JPC - JPC file. RAS - RAS file. PGX - PGX file. PNM - PNM file.
iThumbnailWidth the user define width of thumbnail image.
iThumbnailHeight the user define height of thumbnail image.
clrBackColor the background color of thumbnail image.
Return Value
Return 1 - successful Return 0 - Failed
Example
|
Visual Basic Syntax ImageViewer1.CreateThumbnail("c:\test1", "PNG", 160, 120, RGB(255,0,0))
|
|
|