Image Viewer CP Gold SDK ActiveX Control ReferenceMethods Crop2ImageFile Image Viewer CP ActiveX Control Crop2ImageFile Crop the image to a rectangle containing the selected region and save to image file format. Public Function Crop2ImageFile( _ ByVal strFileName As String, _ ByVal strFileType As String _) 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. Return ValueReturn 1 - successfulReturn 0 - Failed Example Visual Basic SyntaxImageViewer1.Crop2ImageFile "c:\newphoto1", "JPG" 'save to JPEG file