I am using v4.0.30319 of GraphicsMagick.NET.AnyCPU
The code is very simple - I have a byte array containing a multipage tiff. From there the applicable code is
An exception of type 'System.ArgumentNullException' occurred in GraphicsMagick.NET-AnyCPU.dll but was not handled in user code
Stack trace:
at GraphicsMagick.MagickImage.ToBase64()
at TestProg.<ConvertBytesToString>b__10(MagickImage a)
at System.Linq.Parallel.ForAllOperator
at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
Detail:
System.ArgumentNullException was unhandled by user code
HResult=-2147467261
Message=Value cannot be null.
Parameter name: inArray
Source=GraphicsMagick.NET-AnyCPU
ParamName=inArray
StackTrace:
The code is very simple - I have a byte array containing a multipage tiff. From there the applicable code is
MagickImageCollection returnImage = null;
using (MemoryStream ms = new MemoryStream(ByteData))
{
try
{
returnImage = new MagickImageCollection(ms);
returnImage.AsParallel().ForAll(a => a.Format=MagickFormat.Png);
returnImage.AsParallel().AsOrdered().ForAll(a =>a.ToBase64());
}
catch (Exception e)
{
*exception handling*
}
}
Exception occurs and does not hit my exception handler, it breaks on the Tobase64 line:An exception of type 'System.ArgumentNullException' occurred in GraphicsMagick.NET-AnyCPU.dll but was not handled in user code
Stack trace:
at GraphicsMagick.MagickImage.ToBase64()
at TestProg.<ConvertBytesToString>b__10(MagickImage a)
at System.Linq.Parallel.ForAllOperator
1.ForAllEnumerator
1.MoveNext(TInput& currentElement, Int32& currentKey)at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
Detail:
System.ArgumentNullException was unhandled by user code
HResult=-2147467261
Message=Value cannot be null.
Parameter name: inArray
Source=GraphicsMagick.NET-AnyCPU
ParamName=inArray
StackTrace:
at GraphicsMagick.MagickImage.ToBase64()
at TestProg.<ConvertBytesToString>b__10(MagickImage a)
at System.Linq.Parallel.ForAllOperator`1.ForAllEnumerator`1.MoveNext(TInput& currentElement, Int32& currentKey)
at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
InnerException: