1
Answer

Get Spcific Page From the Multiple pages In the Tiff Page

ravi indraN

ravi indraN

16y
4.8k
1

Dim img As Image = Image.FromFile("C:\Documents and Settings\Administrator\Desktop\00708A0E.TIF")

        Dim ms As MemoryStream = Nothing

        Dim returnImage As Image = Image.FromFile("C:\Documents and Settings\Administrator\Desktop\00708A0E.TIF")

        Try

            ms = New MemoryStream()

            Dim ID As Guid = img.FrameDimensionsList(0)

            Dim fd As New FrameDimension(ID)

            Dim Count As Integer = img.GetFrameCount(fd)

 

            If I < Count Then

                img.SelectActiveFrame(fd, I)

                img.Save(ms, ImageFormat.Bmp)

                returnImage = Image.FromStream(ms)

                ImageViewer.Image = returnImage

            Else

                Exit Sub

            End If

        Catch ex As Exception

            MessageBox.Show(ex.Message.ToString(), "Error")

        Finally

            ms.Close()

            I += 1

        End Try

Answers (1)