Split a .Tiff file to jpg using kodak Imaging in .net

Wednesday, 7 January 2015

Split a .Tiff file to jpg using kodak Imaging in .net

  •   Take a imagedit control on on a windows form 
  •   Give a path where all the jpg file will split 
  •   Give a file name
  Public Sub split_singlefile(ByVal fnameAs String, ByVal fPath As String)
        Dim Picpath = 'The path where the jpg file will exist
        ImgEdit.Image = fPath ' the tiff file path
        TOTPAGE = ImgEdit.PageCount
        Dim i As Integer = 1
        Dim objCompress As New CompressImage
        While (i <= TOTPAGE)

            Dim filename As String = Picpath & "\Fil" + Trim(Str(i)) + ".jpg"
            ImgEdit.Page = i
            ImgEdit.Display()
            ImgEdit.Refresh()
            ImgEdit.SavePage(filename, FileTypeConstants.wiFileTypeTIFF, 2, 9, 4, False, 1)

            ImgEdit.Refresh()
            ImgEdit.EndInit()
            ImgEdit.ClearDisplay()
            ImgEdit.Page = 1
            i = i + 1


                  End While

     
    End Sub