I'm working with multipage TIF images, same as I have coded in Base64 string and then decode them.
The problem is when I apply decoding only one file is created with the first image.
Regards.
Code: Select all
Private Sub btnCodifica_Click(sender As Object, e As EventArgs) Handles btnCodifica.Click
Try
If Not String.IsNullOrEmpty(txtPathFIle.Text) Then
Dim imageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile(txtPathFIle.Text)
If oGdPictureImaging.GetStat = GdPictureStatus.OK Then
Dim fileString As String = oGdPictureImaging.Encode64String(oGdPictureImaging.SaveAsString(imageID, DocumentFormat.DocumentFormatTIFF, 65536))
oGdPictureImaging.ReleaseGdPictureImage(imageID)
txtBase64.Text = fileString
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub btnDecodifica_Click(sender As Object, e As EventArgs) Handles btnDecodifica.Click
Try
If Not String.IsNullOrEmpty(txtBase64.Text) Then
Dim imageID As Integer = oGdPictureImaging.CreateGdPictureImageFromString(oGdPictureImaging.Decode64String(txtBase64.Text))
If oGdPictureImaging.GetStat = GdPictureStatus.OK Then
Dim sPathOut As String = "C:\ImageDecode.tif"
oGdPictureImaging.SaveAsPNG(imageID, sPathOut)
oGdPictureImaging.ReleaseGdPictureImage(imageID)
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub