Code to convert a collection of .jpg files to a single tiff file

Im struggling to resolve how to code to convert a collection of .jpg files to a single tiff file

any suggestion or access to existing code would be much apricated

The following is not working.

Dim tiffOptions As New TiffOptions(TiffExpectedFormat.Default)
tiffOptions.Compression = TiffCompressions.Deflate

Dim firstImage As Image = Image.Load(pFileCollection(0))
Dim imageWidth As Integer = firstImage.Width
Dim imageHeight As Integer = firstImage.Height
firstImage.Dispose() ’ Dispose of the first image once we have its dimensions

Try
Using initialFrame As New TiffFrame(tiffOptions, imageWidth, imageHeight)
Using tiffImage As New TiffImage(initialFrame)
’ Loop through each .jpg file and add it to the TiffImage
For Each jpgFile As String In pFileCollection
Using image As Image = Image.Load(jpgFile)
tiffImage.AddFrame(TiffFrame.CopyFrame(image))
End Using
Next
’ Save the TiffImage as a single .tif file
tiffImage.Save(pNewFileName)
End Using
End Using
Catch ex As Exception

        End Try

Hello, @Andre123,
Here are the links to our code examples for your case: Creating multipage image or Add page to TIFF.