I am unfortunately still having problems with combining a large number of TIFF files. I have even tried using the latest release 20.8. Using the same code, I am getting the following exception:
Image export failed. Cannot access a disposed object.
Object name: ‘TiffFrame’.
at Aspose.Imaging.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
at Aspose.Imaging.RasterImage.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
at Aspose.Imaging.Image.Save(Stream stream, ImageOptionsBase optionsBase)
at ImageMan64Test.AsposeFunc.CombineImageFiles(String fpDest, String[] safp, Int32[]& nPageCounts) in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\AsposeFunc.cs:line 408
at ImageMan64Test.frmTestImageMan.btnAspose_Click(Object sender, EventArgs e) in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\Form1.cs:line 75
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at ImageMan64Test.Program.Main() in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\Program.cs:line 19
Another thing that I tried was removing the TiffOptions parameter in the Save function. I still got the same exception, but the stack trace was a little different:
at Aspose.Imaging.DisposableObject.VerifyNotDisposed()
at .( , Int32[][] , Rectangle , Boolean )
at . (Rectangle )
at .( , IList1 , ) at .(Rectangle , , , Int32 , Int32 , ) at . (TiffStreamReader , Rectangle , IPartialArgb32PixelLoader ) at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader ) at . (Rectangle ) at .( , IList
1 , )
at .(Rectangle , , , Int32 , Int32 , )
at . (Rectangle , IPartialArgb32PixelLoader )
at Aspose.Imaging.RasterImage.(Rectangle , IPartialArgb32PixelLoader )
at Aspose.Imaging.RasterImage.LoadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)
at Aspose.Imaging.FileFormats.Tiff.TiffFrame.(RasterImage , TiffStreamWriter , Boolean , TiffOptions , ExifData , XmpPacketWrapper , Rectangle )
at Aspose.Imaging.FileFormats.Tiff.TiffImage.(TiffStreamWriter )
at Aspose.Imaging.FileFormats.Tiff.TiffImage.SaveData(Stream stream)
at Aspose.Imaging.DataStreamSupporter.Save(Stream stream)
at ImageMan64Test.AsposeFunc.CombineImageFiles(String fpDest, String[] safp, Int32[]& nPageCounts) in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\AsposeFunc.cs:line 408
at ImageMan64Test.frmTestImageMan.btnAspose_Click(Object sender, EventArgs e) in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\Form1.cs:line 75
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at ImageMan64Test.Program.Main() in C:\dev\Testing\ImageManvsAsposeTest\ImageMan64Test\Program.cs:line 19