'''' This code is part of Document Solutions for Imaging demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsSystem.Collections.GenericImportsSystem.LinqImportsSystem.NumericsImportsGrapeCity.Documents.DrawingImportsGrapeCity.Documents.TextImportsGrapeCity.Documents.Imaging '' This sample loads several JPEG images and combines them'' into a single multi-frame TIFF.PublicClassMakeTiffFunctionGenerateImageStream(ByVal targetMime AsString,ByVal pixelSize AsSize,ByVal dpi AsSingle,ByVal opaque AsBoolean,Optional sampleParams AsString() = Nothing) AsStream IfNot targetMime = MimeTypes.TIFF ThenThrowNew Exception("This sample only supports TIFF output format.")EndIf Dim sources AsString() = {Path.Combine("Resources", "Images", "colosseum.jpg"),Path.Combine("Resources", "Images", "lady.jpg"),Path.Combine("Resources", "Images", "minerva.jpg"),Path.Combine("Resources", "Images", "forum.jpg") } Dim ms = NewMemoryStream()Using tw = NewGcTiffWriter(ms)ForEach src In sourcesUsing bmp = NewGcBitmap(src) tw.AppendFrame(bmp)EndUsingNextEndUsing ms.Seek(0, SeekOrigin.Begin)Return msEndFunction PublicReadOnlyPropertyDefaultMime() AsStringGetReturn MimeTypes.TIFFEndGetEndPropertyEndClass